OSDN Git Service

Merging r367215:
[android-x86/external-llvm.git] / test / FileCheck / check-empty-tag.txt
1 ; basic functionality
2 ; RUN: FileCheck %s --input-file %s --check-prefix=CHECK1
3 foo
4
5 bar
6 CHECK1: foo
7 CHECK1-EMPTY:
8 CHECK1-NEXT: bar
9
10 ; next line must be blank
11 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK2A 2>&1 | FileCheck %s --check-prefix=CHECK2B
12 badger
13 CHECK2A: badger
14 CHECK2A-EMPTY:
15 CHECK2B: CHECK2A-EMPTY: is not on the line after the previous match
16
17 ; CHECK-EMPTY must have empty pattern
18 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK3A 2>&1 | FileCheck %s --check-prefix=CHECK3B
19 CHECK3A: foo
20 CHECK3A-EMPTY: this is not empty
21 CHECK3B: found non-empty check string for empty check with prefix 'CHECK3A:'
22
23 ; CHECK-EMPTY cannot be the first check
24 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK4A 2>&1 | FileCheck %s --check-prefix=CHECK4B
25 CHECK4A-EMPTY:
26 CHECK4B: found 'CHECK4A-EMPTY' without previous 'CHECK4A: line
27
28 ; CHECK-EMPTY-NOT and CHECK-NOT-EMPTY rejected
29 ; RUN: not FileCheck %s --input-file %s --check-prefixes=CHECK5A 2>&1 | FileCheck %s --check-prefix=CHECK5C
30 ; RUN: not FileCheck %s --input-file %s --check-prefixes=CHECK5B 2>&1 | FileCheck %s --check-prefix=CHECK5C
31 CHECK5A-EMPTY-NOT:
32 CHECK5B-NOT-EMPTY:
33 CHECK5C: unsupported -NOT combo on prefix 'CHECK5{{A|B}}'
34
35 ; whitespace does not count as empty
36 ; RUN: not FileCheck %s --input-file %s --check-prefix=CHECK6A --match-full-lines 2>&1 | FileCheck %s --check-prefix=CHECK6B
37 CHECK6A: the next line has spaces
38 CHECK6A-EMPTY:
39 CHECK6B: expected string not found in input
40
41 ; ***don't add any further blank lines after this point***
42 ; CHECK-EMPTY, like CHECK-NEXT, will report an error if the first matching
43 ; line is not the line immediately following the previous check.
44 the next line has spaces
45