1 ; Check handling of match-time diagnostics for invalid patterns (e.g.,
2 ; substitution overflow) in the case of expected patterns (e.g., CHECK).
5 RUN: 'CHECK: [[#0x8000000000000000+0x8000000000000000]] [[UNDEFVAR]]'
6 RUN: echo > %t.in '10000000000000000'
9 ERR:{{.*}}: error: unable to substitute variable or numeric expression: overflow error
10 ERR-NEXT:CHECK: {{.*}}
12 ERR-NEXT:{{.*}}: error: undefined variable: UNDEFVAR
13 ERR-NEXT:{{CHECK: \[\[#0x8000000000000000\+0x8000000000000000\]\] \[\[UNDEFVAR\]\]}}
15 ERR-NOT:{{error|note|remark}}:
18 DUMP-NEXT: 1: 10000000000000000
19 DUMP-NEXT:check:1'0 X~~~~~~~~~~~~~~~~~ error: match failed for invalid pattern
20 DUMP-NEXT:check:1'1 unable to substitute variable or numeric expression: overflow error
21 DUMP-NEXT:check:1'2 undefined variable: UNDEFVAR
24 ;--------------------------------------------------
25 ; Check -dump-input=never cases.
26 ;--------------------------------------------------
28 RUN: %ProtectFileCheckOutput \
29 RUN: not FileCheck -dump-input=never %t.chk < %t.in 2>&1 \
30 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR
32 RUN: %ProtectFileCheckOutput \
33 RUN: not FileCheck -dump-input=never -v %t.chk < %t.in 2>&1 \
34 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR
36 RUN: %ProtectFileCheckOutput \
37 RUN: not FileCheck -dump-input=never -vv %t.chk < %t.in 2>&1 \
38 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR
40 ;--------------------------------------------------
41 ; Check -dump-input=fail cases.
42 ;--------------------------------------------------
44 RUN: %ProtectFileCheckOutput \
45 RUN: not FileCheck -dump-input=fail %t.chk < %t.in 2>&1 \
46 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR,DUMP
48 RUN: %ProtectFileCheckOutput \
49 RUN: not FileCheck -dump-input=fail -v %t.chk < %t.in 2>&1 \
50 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR,DUMP
52 RUN: %ProtectFileCheckOutput \
53 RUN: not FileCheck -dump-input=fail -vv %t.chk < %t.in 2>&1 \
54 RUN: | FileCheck %s -match-full-lines -check-prefixes=ERR,DUMP