blob: bbdd8e8c69ec9d11c7bbb79fb0e3edc6d7480fd1 [file] [log] [blame]
; Test functionality of -D# option: numeric variables are defined to the right
; value and CHECK directives using them match as expected given the value set.
RUN: FileCheck -D#NUMVAL=12 --check-prefix CHECKNUM --input-file %s %s
RUN: not FileCheck -D#NUMVAL=8 --check-prefix CHECKNUM --input-file %s %s 2>&1 \
RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRMSG
RUN: not FileCheck -D#NUMVAL=12 --check-prefix NUMNOT --input-file %s %s 2>&1 \
RUN: | FileCheck %s --strict-whitespace --check-prefix NOT-NUMERRMSG
RUN: FileCheck -D#NUMVAL=8 --check-prefixes NUMNOT --input-file %s %s
Numeric value = 12
CHECKNUM: Numeric value = [[#NUMVAL]]
NUMNOT-NOT: Numeric value = [[#NUMVAL]]
NUMERRMSG: defines.txt:[[#@LINE-3]]:11: error: CHECKNUM: expected string not found in input
NUMERRMSG: defines.txt:1:1: note: scanning from here
NUMERRMSG: defines.txt:1:1: note: with "NUMVAL" equal to "8"
NUMERRMSG: defines.txt:[[#@LINE-7]]:1: note: possible intended match here
NOT-NUMERRMSG: defines.txt:[[#@LINE-7]]:13: error: {{NUMNOT}}-NOT: excluded string found in input
NOT-NUMERRMSG: defines.txt:[[#@LINE-10]]:1: note: found here
NOT-NUMERRMSG: defines.txt:[[#@LINE-11]]:1: note: with "NUMVAL" equal to "12"