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