brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 2c88b66 Raw
53 lines · plain
1; Test incorrect syntax for -D option is correctly diagnosed.2 3; Missing equal sign.4RUN: %ProtectFileCheckOutput not FileCheck -DVALUE10 --input-file %s %s 2>&1 \5RUN:   | FileCheck %s --check-prefix ERRCLIEQ16 7ERRCLIEQ1: Missing equal sign in command-line definition '-DVALUE10'8 9; Missing definition expression (variable name, equal sign and value).10RUN: %ProtectFileCheckOutput not FileCheck -D --input-file %s %s 2>&1 \11RUN:   | FileCheck %s --check-prefix ERRCLIEQ212 13ERRCLIEQ2: {{F|f}}ile{{C|c}}heck{{[^:]*}}: for the -D option: requires a value!14 15; Missing variable name.16RUN: %ProtectFileCheckOutput not FileCheck -D=10 --input-file %s %s 2>&1 \17RUN:   | FileCheck %s --check-prefix ERRCLIVAR118 19ERRCLIVAR1: Missing variable name in command-line definition '-D=10'20 21; Missing variable name.22RUN: %ProtectFileCheckOutput not FileCheck -D= --input-file %s %s 2>&1 \23RUN:   | FileCheck %s --check-prefix ERRCLIVAR224 25ERRCLIVAR2: Missing variable name in command-line definition '-D='26 27; Invalid variable name: starts with a digit.28RUN: %ProtectFileCheckOutput \29RUN: not FileCheck -D10VALUE=10 --input-file %s %s 2>&1 \30RUN:   | FileCheck %s --strict-whitespace --match-full-lines --check-prefix ERRCLINAME31 32ERRCLINAME:Global defines:1:19: error: invalid variable name33ERRCLINAME-NEXT:Global define #1: 10VALUE=1034ERRCLINAME-NEXT:                  ^35 36; Invalid definition of pseudo variable.37RUN: %ProtectFileCheckOutput \38RUN: not FileCheck -D@VALUE=10 --input-file %s %s 2>&1 \39RUN:   | FileCheck %s --strict-whitespace --match-full-lines --check-prefix ERRCLIPSEUDO40 41ERRCLIPSEUDO:Global defines:1:19: error: invalid name in string variable definition '@VALUE'42ERRCLIPSEUDO-NEXT:Global define #1: @VALUE=1043ERRCLIPSEUDO-NEXT:                  ^44 45; Invalid definition of an expression.46RUN: %ProtectFileCheckOutput \47RUN: not FileCheck -D'VALUE + 2=10' --input-file %s %s 2>&1 \48RUN:   | FileCheck %s --strict-whitespace --check-prefix ERRCLITRAIL49 50ERRCLITRAIL:Global defines:1:19: error: invalid name in string variable definition 'VALUE + 2'51ERRCLITRAIL-NEXT:Global define #1: VALUE + 2=1052ERRCLITRAIL-NEXT:                  ^53