Skip to content

Commit efd7bd8

Browse files
committed
Add test cases
1 parent 9a1f4db commit efd7bd8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
a
2+
3+
; RUN: not FileCheck -input-file %s %s 2>&1 | \
4+
; RUN: FileCheck -check-prefix CHECK-ERROR -DDIR=%S \
5+
; RUN: --match-full-lines --strict-whitespace %s
6+
7+
; CHECK: a[[]]
8+
; CHECK-ERROR:[[DIR]]/empty-variable-name.txt:7:13: error: empty variable name
9+
; CHECK-ERROR-NEXT:; CHECK: a{{\[\[\]\]}}
10+
; CHECK-ERROR-NEXT: ^
11+
12+
b
13+
14+
; RUN: not FileCheck -input-file %s -check-prefix CHECK-PSEUDO %s 2>&1 | \
15+
; RUN: FileCheck -check-prefix CHECK-ERROR-PSEUDO -DDIR=%S \
16+
; RUN: --match-full-lines --strict-whitespace %s
17+
18+
; CHECK-PSEUDO: b[[@]]
19+
; CHECK-ERROR-PSEUDO:[[DIR]]/empty-variable-name.txt:18:20: error: empty pseudo variable name
20+
; CHECK-ERROR-PSEUDO-NEXT:; CHECK-PSEUDO: b{{\[\[@\]\]}}
21+
; CHECK-ERROR-PSEUDO-NEXT: ^
22+
23+
c
24+
25+
; RUN: not FileCheck -input-file %s -check-prefix CHECK-GLOBAL %s 2>&1 | \
26+
; RUN: FileCheck -check-prefix CHECK-ERROR-GLOBAL -DDIR=%S \
27+
; RUN: --match-full-lines --strict-whitespace %s
28+
29+
; CHECK-GLOBAL: c[[$]]
30+
; CHECK-ERROR-GLOBAL:[[DIR]]/empty-variable-name.txt:29:20: error: empty global variable name
31+
; CHECK-ERROR-GLOBAL-NEXT:; CHECK-GLOBAL: c{{\[\[\$\]\]}}
32+
; CHECK-ERROR-GLOBAL-NEXT: ^

0 commit comments

Comments
 (0)