1 ; Check handling of diagnostics for problematic matches (e.g., variable capture
2 ; overflow) in the case of expected patterns (e.g., CHECK).
4 RUN: echo > %t.chk 'CHECK: [[#122+1]] [[STR:abc]] [[#NUM:]]'
5 RUN: echo > %t.in '123 abc 1000000000000000000000000000000000000000000000000000'
8 ERR:{{.*}}: remark: CHECK: expected string found in input
11 ERR-NEXT:<stdin>:1:1: note: found here
12 ERR-NEXT:123 abc 10{{0*}}
13 ERR-NEXT:^~~~~~~~~{{~*}}
14 ERR-NEXT:<stdin>:1:1: note: with "122+1" equal to "123"
15 ERR-NEXT:123 abc 10{{0*}}
17 ERR-NEXT:<stdin>:1:5: note: captured var "STR"
18 ERR-NEXT:123 abc 10{{0*}}
20 ERR-NEXT:<stdin>:1:9: error: unable to represent numeric value
21 ERR-NEXT:123 abc 10{{0*}}
23 ERR-NOT:{{error|note|remark}}:
26 DUMP-NEXT: 1: 123 abc 10{{0*}}
27 DUMP-NEXT:check:1'0 ^~~~~~~~~~{{~*}}
28 DUMP-NEXT:check:1'1 with "122+1" equal to "123"
29 DUMP-NEXT:check:1'2 ^~~ captured var "STR"
30 DUMP-NEXT:check:1'3 !~{{~*}} error: unable to represent numeric value
33 ;--------------------------------------------------
34 ; Check -dump-input=never cases.
35 ;--------------------------------------------------
37 RUN: %ProtectFileCheckOutput \
38 RUN: not FileCheck -dump-input=never %t.chk < %t.in 2>&1 \
39 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR
41 RUN: %ProtectFileCheckOutput \
42 RUN: not FileCheck -dump-input=never -v %t.chk < %t.in 2>&1 \
43 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR
45 RUN: %ProtectFileCheckOutput \
46 RUN: not FileCheck -dump-input=never -vv %t.chk < %t.in 2>&1 \
47 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR
49 ;--------------------------------------------------
50 ; Check -dump-input=fail cases.
51 ;--------------------------------------------------
53 RUN: %ProtectFileCheckOutput \
54 RUN: not FileCheck -dump-input=fail %t.chk < %t.in 2>&1 \
55 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR,DUMP
57 RUN: %ProtectFileCheckOutput \
58 RUN: not FileCheck -dump-input=fail -v %t.chk < %t.in 2>&1 \
59 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR,DUMP
61 RUN: %ProtectFileCheckOutput \
62 RUN: not FileCheck -dump-input=fail -vv %t.chk < %t.in 2>&1 \
63 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR,DUMP