1 ; Test incorrect syntax for -D# option is correctly diagnosed.
3 ; Invalid variable name: starts with a digit.
4 RUN: %ProtectFileCheckOutput \
5 RUN: not FileCheck -D#10VALUE=10 --input-file %s %s 2>&1 \
6 RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix NUMERRCLINAME
8 NUMERRCLINAME:Global defines:1:46: error: invalid variable name
9 NUMERRCLINAME-NEXT:Global define #1: #10VALUE=10 (parsed as: {{\[\[#10VALUE:10\]\]}})
12 ; Invalid definition of pseudo variable.
13 RUN: %ProtectFileCheckOutput \
14 RUN: not FileCheck -D#@VALUE=10 --input-file %s %s 2>&1 \
15 RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix NUMERRCLIPSEUDO
17 NUMERRCLIPSEUDO:Global defines:1:45: error: definition of pseudo numeric variable unsupported
18 NUMERRCLIPSEUDO-NEXT:Global define #1: #@VALUE=10 (parsed as: {{\[\[#@VALUE:10\]\]}})
19 NUMERRCLIPSEUDO-NEXT: ^
21 ; Invalid definition of an expression.
22 RUN: %ProtectFileCheckOutput \
23 RUN: not FileCheck -D#VALUE+2=10 --input-file %s %s 2>&1 \
24 RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix NUMERRCLITRAIL
26 NUMERRCLITRAIL:Global defines:1:51: error: unexpected characters after numeric variable name
27 NUMERRCLITRAIL-NEXT:Global define #1: #VALUE+2=10 (parsed as: {{\[\[#VALUE\+2:10\]\]}})
28 NUMERRCLITRAIL-NEXT: ^
30 ; Invalid format for variable.
31 RUN: %ProtectFileCheckOutput \
32 RUN: not FileCheck -D#,VALUE=10 --input-file %s %s 2>&1 \
33 RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix NUMERRCLIFMT
35 NUMERRCLIFMT:Global defines:1:45: error: invalid matching format specification in expression
36 NUMERRCLIFMT-NEXT:Global define #1: #,VALUE=10 (parsed as: {{\[\[#,VALUE:10\]\]}})