xref: /llvm-project/llvm/test/FileCheck/verbose.txt (revision 09c35739035e23279e9369b8bf048288781a3d60)
1; RUN: %ProtectFileCheckOutput \
2; RUN: FileCheck --dump-input=never --input-file %s %s 2>&1 | \
3; RUN:   FileCheck --check-prefix QUIET --allow-empty %s
4
5; RUN: %ProtectFileCheckOutput \
6; RUN: FileCheck --dump-input=never -v --input-file %s %s 2>&1 | \
7; RUN:   FileCheck --strict-whitespace --check-prefix V %s
8
9; RUN: %ProtectFileCheckOutput \
10; RUN: FileCheck --dump-input=never -vv --input-file %s %s 2>&1 | \
11; RUN:   FileCheck --strict-whitespace --check-prefixes V,VV %s
12
13; RUN: %ProtectFileCheckOutput \
14; RUN: FileCheck --dump-input=never -v -v --input-file %s %s 2>&1 | \
15; RUN:   FileCheck --strict-whitespace --check-prefix V %s
16
17; RUN: %ProtectFileCheckOutput \
18; RUN: FileCheck --dump-input=never -vv -vv --input-file %s %s 2>&1 | \
19; RUN:   FileCheck --strict-whitespace --check-prefixes V,VV %s
20
21; RUN: %ProtectFileCheckOutput \
22; RUN: FileCheck --dump-input=never -v -vv --input-file %s %s 2>&1 | \
23; RUN:   FileCheck --strict-whitespace --check-prefixes V,VV %s
24
25; RUN: %ProtectFileCheckOutput \
26; RUN: FileCheck --dump-input=never -vv -v --input-file %s %s 2>&1 | \
27; RUN:   FileCheck --strict-whitespace --check-prefixes V,VV %s
28
29; END.
30
31foo
32bar
33CHECK: foo
34CHECK-NOT: raboof
35CHECK-NEXT: bar
36
37V:      verbose.txt:[[@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
38V-NEXT:  {{C}}HECK: foo{{$}}
39V-NEXT: {{^}}       ^{{$}}
40V-NEXT: verbose.txt:[[@LINE-9]]:1: note: found here
41V-NEXT: {{^}}foo{{$}}
42V-NEXT: {{^}}^~~{{$}}
43
44V-NEXT: verbose.txt:[[@LINE-9]]:13: remark: {{C}}HECK-NEXT: expected string found in input
45V-NEXT:  {{C}}HECK-NEXT: bar{{$}}
46V-NEXT: {{^}}            ^{{$}}
47V-NEXT: verbose.txt:[[@LINE-15]]:1: note: found here
48V-NEXT: {{^}}bar{{$}}
49V-NEXT: {{^}}^~~{{$}}
50
51VV-NEXT: verbose.txt:[[@LINE-17]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
52VV-NEXT:  {{C}}HECK-NOT: raboof{{$}}
53VV-NEXT: {{^}}           ^{{$}}
54VV-NEXT: verbose.txt:[[@LINE-23]]:4: note: scanning from here
55VV-NEXT: {{^}}foo{{$}}
56VV-NEXT: {{^}}   ^{{$}}
57
58STRVAR=foobar
59STRVAR:foobar
60CHECK: STRVAR=[[STRVAR:[a-z]+]]
61CHECK-NEXT: STRVAR:[[STRVAR]]
62
63     V: verbose.txt:[[#@LINE-3]]:8: remark: {{C}}HECK: expected string found in input
64V-NEXT: {{C}}HECK: {{STRVAR=\[\[STRVAR:\[a-z\]\+\]\]}}
65V-NEXT:  {{^}}       ^{{$}}
66V-NEXT: verbose.txt:[[#@LINE-8]]:1: note: found here
67V-NEXT: {{^}}STRVAR=foobar{{$}}
68V-NEXT: {{^}}^~~~~~~~~~~~~{{$}}
69V-NEXT: verbose.txt:[[#@LINE-11]]:8: note: captured var "STRVAR"
70V-NEXT: {{^}}STRVAR=foobar{{$}}
71V-NEXT: {{^}}       ^~~~~~{{$}}
72
73V-NEXT: verbose.txt:[[#@LINE-12]]:13: remark: {{C}}HECK-NEXT: expected string found in input
74V-NEXT: {{C}}HECK-NEXT: {{STRVAR:\[\[STRVAR\]\]}}
75V-NEXT:  {{^}}            ^{{$}}
76V-NEXT: verbose.txt:[[#@LINE-17]]:1: note: found here
77V-NEXT: {{^}}STRVAR:foobar{{$}}
78V-NEXT: {{^}}^~~~~~~~~~~~~{{$}}
79V-NEXT: verbose.txt:[[#@LINE-20]]:1: note: with "STRVAR" equal to "foobar"
80V-NEXT: {{^}}STRVAR:foobar{{$}}
81V-NEXT: {{^}}^{{$}}
82
83NUMVAR=42
84NUMVAR - 1:41
85CHECK: NUMVAR=[[#NUMVAR:]]
86CHECK-NOT: [[#NUMVAR + 1]]
87CHECK-NEXT: NUMVAR - 1:[[#NUMVAR - 1]]
88
89V:      verbose.txt:[[#@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
90V-NEXT: {{C}}HECK: {{NUMVAR=[[][[]#NUMVAR:[]][]]$}}
91V-NEXT:  {{^}}       ^{{$}}
92V-NEXT: verbose.txt:[[#@LINE-9]]:1: note: found here
93V-NEXT: {{^}}NUMVAR=42{{$}}
94V-NEXT: {{^}}^~~~~~~~~{{$}}
95V-NEXT: verbose.txt:[[#@LINE-12]]:8: note: captured var "NUMVAR"
96V-NEXT: NUMVAR=42
97V-NEXT:        ^~
98
99V-NEXT: verbose.txt:[[#@LINE-12]]:13: remark: {{C}}HECK-NEXT: expected string found in input
100V-NEXT: {{C}}HECK-NEXT: {{NUMVAR - 1:[[][[]#NUMVAR - 1[]][]]$}}
101V-NEXT:  {{^}}            ^{{$}}
102V-NEXT: verbose.txt:[[#@LINE-18]]:1: note: found here
103V-NEXT: {{^}}NUMVAR - 1:41{{$}}
104V-NEXT: {{^}}^~~~~~~~~~~~~{{$}}
105V-NEXT: verbose.txt:[[#@LINE-21]]:1: note: with "NUMVAR - 1" equal to "41"
106V-NEXT: {{^}}NUMVAR - 1:41{{$}}
107V-NEXT: {{^}}^{{$}}
108
109VV-NEXT: verbose.txt:[[#@LINE-23]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
110VV-NEXT: {{C}}HECK-NOT: {{[[][[]#NUMVAR [+] 1[]][]]$}}
111VV-NEXT:   {{^}}           ^{{$}}
112VV-NEXT: verbose.txt:[[#@LINE-29]]:10: note: scanning from here
113VV-NEXT: {{^}}NUMVAR=42{{$}}
114VV-NEXT: {{^}}         ^{{$}}
115
116before empty
117
118after empty
119CHECK: before empty
120CHECK-EMPTY:
121CHECK-NEXT: after empty
122
123V:      verbose.txt:[[@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
124V-NEXT:  {{C}}HECK: before empty{{$}}
125V-NEXT: {{^}}       ^{{$}}
126V-NEXT: verbose.txt:[[@LINE-10]]:1: note: found here
127V-NEXT: {{^}}before empty{{$}}
128V-NEXT: {{^}}^~~~~~~~~~~~{{$}}
129
130V-NEXT:  verbose.txt:[[@LINE-10]]:13: remark: {{C}}HECK-EMPTY: expected string found in input
131V-NEXT:   {{C}}HECK-EMPTY:{{$}}
132V-NEXT:  {{^}}            ^{{$}}
133V-NEXT:  verbose.txt:[[@LINE-16]]:1: note: found here
134V-EMPTY:
135V-NEXT:  {{^}}^{{$}}
136
137V-NEXT: verbose.txt:[[@LINE-16]]:13: remark: {{C}}HECK-NEXT: expected string found in input
138V-NEXT:  {{C}}HECK-NEXT: after empty{{$}}
139V-NEXT: {{^}}            ^{{$}}
140V-NEXT: verbose.txt:[[@LINE-22]]:1: note: found here
141V-NEXT: {{^}}after empty{{$}}
142V-NEXT: {{^}}^~~~~~~~~~~{{$}}
143
144abcdef
145abcdef
146CHECK-DAG: abcdef
147CHECK-DAG: def
148
149V-NEXT: verbose.txt:[[@LINE-3]]:12: remark: {{C}}HECK-DAG: expected string found in input
150V-NEXT:  {{C}}HECK-DAG: abcdef
151V-NEXT: {{^}}           ^{{$}}
152V-NEXT: verbose.txt:[[@LINE-8]]:1: note: found here
153V-NEXT: {{^}}abcdef{{$}}
154V-NEXT: {{^}}^~~~~~{{$}}
155
156VV-NEXT: verbose.txt:[[@LINE-9]]:12: remark: {{C}}HECK-DAG: expected string found in input
157VV-NEXT:  {{C}}HECK-DAG: def
158VV-NEXT: {{^}}           ^{{$}}
159VV-NEXT: verbose.txt:[[@LINE-15]]:4: note: found here
160VV-NEXT:   {{^abcdef$}}
161VV-NEXT: {{^}}   ^~~
162VV-NEXT: verbose.txt:[[@LINE-18]]:1: note: match discarded, overlaps earlier DAG match here
163VV-NEXT: {{^}}abcdef{{$}}
164VV-NEXT: {{^}}^~~~~~{{$}}
165
166V-NEXT: verbose.txt:[[@LINE-19]]:12: remark: {{C}}HECK-DAG: expected string found in input
167V-NEXT:  {{C}}HECK-DAG: def
168V-NEXT: {{^}}           ^{{$}}
169V-NEXT: verbose.txt:[[@LINE-24]]:4: note: found here
170V-NEXT:   {{^abcdef$}}
171V-NEXT: {{^}}   ^~~
172
173xyz
174CHECK: xyz
175CHECK-NOT: {{z}}yx
176
177V:      verbose.txt:[[@LINE-3]]:8: remark: {{C}}HECK: expected string found in input
178V-NEXT:  {{C}}HECK: xyz{{$}}
179V-NEXT: {{^}}       ^{{$}}
180V-NEXT: verbose.txt:[[@LINE-7]]:1: note: found here
181V-NEXT: {{^}}xyz{{$}}
182V-NEXT: {{^}}^~~{{$}}
183
184VV-NEXT: verbose.txt:[[@LINE-9]]:19: remark: implicit EOF: expected string found in input
185VV-NEXT: {{C}}HECK-NOT: {{[{][{]z[}][}]yx$}}
186VV-NEXT:          {{^}}                  ^{{$}}
187VV-NEXT: verbose.txt:[[@LINE+13]]:1: note: found here
188VV-NOT:  {{.}}
189VV:      {{^}}^
190
191VV-NEXT: verbose.txt:[[@LINE-16]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
192VV-NEXT: {{C}}HECK-NOT: {{[{][{]z[}][}]yx$}}
193VV-NEXT:   {{^}}           ^{{$}}
194VV-NEXT: verbose.txt:[[@LINE-21]]:4: note: scanning from here
195VV-NEXT: {{^}}xyz{{$}}
196VV-NEXT: {{^}}   ^{{$}}
197
198QUIET-NOT: {{.}}
199V-NOT: {{.}}
200