2 ; RUN: FileCheck %s --input-file %s --check-prefix=CHECK1
10 ; next line must be blank
11 ; RUN: %ProtectFileCheckOutput \
12 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK2A 2>&1 \
13 ; RUN: | FileCheck %s --check-prefix=CHECK2B
17 CHECK2B: CHECK2A-EMPTY: is not on the line after the previous match
19 ; CHECK-EMPTY must have empty pattern
20 ; RUN: %ProtectFileCheckOutput \
21 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK3A 2>&1 \
22 ; RUN: | FileCheck %s --check-prefix=CHECK3B
24 CHECK3A-EMPTY: this is not empty
25 CHECK3B: found non-empty check string for empty check with prefix 'CHECK3A:'
27 ; CHECK-EMPTY cannot be the first check
28 ; RUN: %ProtectFileCheckOutput \
29 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK4A 2>&1 \
30 ; RUN: | FileCheck %s --check-prefix=CHECK4B
32 CHECK4B: found 'CHECK4A-EMPTY' without previous 'CHECK4A: line
34 ; CHECK-EMPTY-NOT and CHECK-NOT-EMPTY rejected
35 ; RUN: %ProtectFileCheckOutput \
36 ; RUN: not FileCheck %s --input-file %s --check-prefixes=CHECK5A 2>&1 \
37 ; RUN: | FileCheck %s --check-prefix=CHECK5C
38 ; RUN: %ProtectFileCheckOutput \
39 ; RUN: not FileCheck %s --input-file %s --check-prefixes=CHECK5B 2>&1 \
40 ; RUN: | FileCheck %s --check-prefix=CHECK5C
43 CHECK5C: unsupported -NOT combo on prefix 'CHECK5{{A|B}}'
45 ; whitespace does not count as empty
46 ; RUN: %ProtectFileCheckOutput \
47 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK6A --match-full-lines \
48 ; RUN: 2>&1 | FileCheck %s --check-prefix=CHECK6B
49 CHECK6A: the next line has spaces
51 CHECK6B: expected string not found in input
53 ; ***don't add any further blank lines after this point***
54 ; CHECK-EMPTY, like CHECK-NEXT, will report an error if the first matching
55 ; line is not the line immediately following the previous check.
56 the next line has spaces