llvm.org GIT mirror llvm / 0b4654f
Commit a test for match-full-lines. I unfortunately neglected to add it in r260540, but it has been sitting in my working dir ever since. D'oh. Modified to work with r290069, which made the CHECK patterns themselves whitespace-sensitive as well, and remove the test added then, as this tests both strict and non-strict modes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291499 91177308-0d34-0410-b5e6-96231b3b80d8 James Y Knight 2 years ago
2 changed file(s) with 53 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
0 // RUN: not FileCheck -match-full-lines -input-file %s %s 2>&1 \
1 // RUN: | FileCheck --check-prefix=ERROR --implicit-check-not=error: %s
2 // RUN: not FileCheck -match-full-lines -strict-whitespace -input-file %s %s 2>&1 \
3 // RUN: | FileCheck --check-prefix=ERROR-STRICT --check-prefix=ERROR --implicit-check-not=error: %s
4
5 Label 1
6 a line
7 trailing whitespace
8 trailing more whitespace
9 Label 2
10 a line
11 leading whitespace
12 leading more whitespace
13
14 Label 3
15 a line
16
17 Label 4
18 a line
19 a random thing
20
21 Label 5
22 Label 66
23
24 // CHECK-LABEL:Label 1
25 // CHECK:a line
26 // CHECK:trailing whitespace
27 // CHECK:trailing more whitespace
28 // ERROR-STRICT:error: expected string not found in input
29 // ERROR-STRICT:// {{C}}HECK:trailing whitespace
30
31 // CHECK-LABEL:Label 2
32 // CHECK:a line
33 // CHECK-NEXT:leading whitespace
34 // CHECK-NEXT: leading more whitespace
35 // ERROR-STRICT:error: expected string not found in input
36 // ERROR-STRICT:// {{C}}HECK-NEXT:leading whitespace
37
38 // CHECK-LABEL:Label 3
39 // CHECK:line
40 // ERROR:error: expected string not found in input
41 // ERROR:// {{C}}HECK:line
42
43 // CHECK-LABEL:Label 4
44 // CHECK:a line
45 // CHECK-NOT:random
46 // ERROR:error: {{C}}HECK-NOT: string occurred!
47 // ERROR:a random thing
48
49 // CHECK-LABEL:Label 5
50 // CHECK-LABEL:Label 6
51 // ERROR:error: expected string not found in input
52 // ERROR:{{C}}HECK-LABEL:Label 6
+0
-14
test/FileCheck/strict-whitespace-match-full-lines.txt less more
None ; RUN: sed 's/^;.*$//' %s \
1 ; RUN: | FileCheck --strict-whitespace --match-full-lines %s
2
3 bla1
4 bla2
5 bla3
6 bla4
7 bla5
8
9 ; CHECK-LABEL:bla1
10 ; CHECK-NEXT:bla2
11 ; CHECK-NEXT: bla3
12 ; CHECK-NEXT:bla4
13 ; CHECK-NEXT: bla5