1 ; Test incorrect syntax for -D# option is correctly diagnosed.
3 ; Invalid variable name: starts with a digit.
4 RUN: not FileCheck -D#10VALUE=10 --input-file %s %s 2>&1 \
5 RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRCLIFMT
7 NUMERRCLIFMT: Global defines:1:20: error: invalid variable name
8 NUMERRCLIFMT-NEXT: Global define #1: #10VALUE=10
9 NUMERRCLIFMT-NEXT: {{^ \^$}}
11 ; Invalid definition of pseudo variable.
12 RUN: not FileCheck -D#@VALUE=10 --input-file %s %s 2>&1 \
13 RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRCLIPSEUDO
15 NUMERRCLIPSEUDO: Global defines:1:20: error: definition of pseudo numeric variable unsupported
16 NUMERRCLIPSEUDO-NEXT: Global define #1: #@VALUE=10
17 NUMERRCLIPSEUDO-NEXT: {{^ \^$}}
19 ; Invalid definition of an expression.
20 RUN: not FileCheck -D#VALUE+2=10 --input-file %s %s 2>&1 \
21 RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRCLITRAIL
23 NUMERRCLITRAIL: Global defines:1:25: error: unexpected characters after numeric variable name
24 NUMERRCLITRAIL-NEXT: Global define #1: #VALUE+2=10
25 NUMERRCLITRAIL-NEXT: {{^ \^$}}
27 ; Invalid value: numeric expression instead of literal.
28 RUN: not FileCheck -D#VALUE1=3 -D#VALUE2='VALUE1 + 2' --input-file %s %s 2>&1 \
29 RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRCLIEXPR
31 NUMERRCLIEXPR: Global defines:2:27: error: invalid value in numeric variable definition 'VALUE1 + 2'
32 NUMERRCLIEXPR-NEXT: Global define #2: #VALUE2=VALUE1 + 2
33 NUMERRCLIEXPR-NEXT: {{^ \^$}}