Skip to content

Commit bdafa32

Browse files
authored
Merge pull request #179 from mull-project/code-climate
Code climate: convert several tests to --strict-whitespace
2 parents 019172c + e414a8f commit bdafa32

File tree

17 files changed

+102
-110
lines changed

17 files changed

+102
-110
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
; CHECK: foo
2-
; CHECK: hello2
3-
; CHECK: hello3
1+
CHECK: foo
2+
CHECK: hello2
3+
CHECK: hello3
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines
1+
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines --strict-whitespace
22

3-
; CHECK: {{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
4-
; CHECK-NEXT: {{^}}; CHECK: foo{{$}}
5-
; CHECK-NEXT: {{^}} ^{{$}}
6-
; CHECK-NEXT: {{^<stdin>:.*:.*: note: scanning from here$}}
7-
; CHECK-NEXT: hello1
8-
; CHECK-NEXT: {{^\^$}}
9-
; CHECK-NEXT: {{^<stdin>:.*:.*: note: possible intended match here$}}
10-
; CHECK: {{^.*$}}
11-
; CHECK: {{^ \^$}}
12-
; CHECK-EMPTY:
3+
CHECK:{{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
4+
CHECK-NEXT:CHECK: foo
5+
CHECK-NEXT: ^
6+
CHECK-NEXT:{{^<stdin>:.*:.*: note: scanning from here$}}
7+
CHECK-NEXT:hello1
8+
CHECK-NEXT:^
9+
CHECK-NEXT:{{^<stdin>:.*:.*: note: possible intended match here$}}
10+
11+
TODO: Difference with LLVM FileCheck
12+
CHECK-NEXT:{{hello(1|3)}}
13+
CHECK:{{^ ?\^}}
14+
CHECK-EMPTY:
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
; CHECK: foo
2-
; CHECK: hello2
3-
; CHECK: hello3
1+
CHECK: foo
2+
CHECK: hello2
3+
CHECK: hello3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines
1+
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines --strict-whitespace
22

3-
; CHECK: {{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
4-
; CHECK-NEXT: {{^}}; CHECK: foo{{$}}
5-
; CHECK-NEXT: {{^}} ^{{$}}
6-
; CHECK-NEXT: {{^<stdin>:.*:.*: note: scanning from here$}}
7-
; CHECK-NEXT: hello1
8-
; CHECK-NEXT: {{^\^$}}
9-
; CHECK-NEXT: {{^<stdin>:.*:.*: note: possible intended match here$}}
10-
; CHECK-NEXT: {{^fo$}}
3+
CHECK:{{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
4+
CHECK-NEXT:CHECK: foo
5+
CHECK-NEXT: ^
6+
CHECK-NEXT:{{^<stdin>:.*:.*: note: scanning from here$}}
7+
CHECK-NEXT:hello1
8+
CHECK-NEXT:^
9+
CHECK-NEXT:{{^<stdin>:.*:.*: note: possible intended match here$}}
10+
CHECK-NEXT:fo
1111

12-
; TODO: https://github.com/stanislaw/FileCheck.py/issues/38
13-
; CHECK-NEXT: {{^ ?\^$}}
14-
; CHECK-EMPTY:
12+
TODO: https://github.com/stanislaw/FileCheck.py/issues/38
13+
CHECK-NEXT:{{^ ?\^$}}
14+
CHECK-EMPTY:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
; CHECK: foo
2-
; CHECK: hello2
3-
; CHECK: hello3
1+
CHECK: foo
2+
CHECK: hello2
3+
CHECK: hello3
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines
1+
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines --strict-whitespace
22

3-
; CHECK: {{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
4-
; CHECK-NEXT: {{^}}; CHECK: foo{{$}}
5-
; CHECK-NEXT: {{^}} ^{{$}}
6-
; CHECK-NEXT: {{^<stdin>:.*:.*: note: scanning from here$}}
7-
; CHECK-NEXT: {{^bar$}}
8-
; CHECK-NEXT: {{^\^$}}
9-
; CHECK-EMPTY:
3+
CHECK:{{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
4+
CHECK-NEXT:CHECK: foo
5+
CHECK-NEXT: ^
6+
CHECK-NEXT:{{^<stdin>:.*:.*: note: scanning from here$}}
7+
CHECK-NEXT:bar
8+
CHECK-NEXT:^
9+
CHECK-EMPTY:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
; CHECK: hello1
2-
; CHECK: foo
3-
; CHECK: hello3
1+
CHECK: hello1
2+
CHECK: foo
3+
CHECK: hello3
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
; RUN: %cat "%S/filecheck.input" | (%FILECHECK_EXEC "%S/filecheck.check" 2>&1 || true) | %FILECHECK_TESTER_EXEC "%s" --match-full-lines
1+
RUN: %cat "%S/filecheck.input" | (%FILECHECK_EXEC "%S/filecheck.check" 2>&1 || true) | %FILECHECK_TESTER_EXEC "%s" --match-full-lines --strict-whitespace
22

3-
; CHECK: {{.*filecheck.check:2:10: error: CHECK: expected string not found in input$}}
4-
; CHECK: {{^}}; CHECK: foo{{$}}
5-
; CHECK: {{^}} ^{{$}}
6-
; CHECK: {{^<stdin>:.*:.*: note: scanning from here$}}
7-
; CHECK: hello2
8-
; CHECK: ^{{$}}
9-
; CHECK: {{^<stdin>:.*:.*: note: possible intended match here$}}
10-
; CHECK: hello2
11-
; CHECK: ^
12-
; CHECK-EMPTY:
3+
CHECK:{{.*filecheck.check:2:8: error: CHECK: expected string not found in input$}}
4+
CHECK-NEXT:CHECK: foo
5+
CHECK-NEXT: ^
6+
CHECK-NEXT:{{^<stdin>:.*:.*: note: scanning from here$}}
7+
CHECK-NEXT:hello2
8+
CHECK-NEXT:^
9+
CHECK-NEXT:{{^<stdin>:.*:.*: note: possible intended match here$}}
10+
CHECK-NEXT:hello2
11+
12+
TODO: Difference with LLVM FileCheck
13+
CHECK-NEXT:{{ ?\^}}
14+
15+
CHECK-EMPTY:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
; CHECK: hello1
2-
; CHECK: hello2
3-
; CHECK: foo
1+
CHECK: hello1
2+
CHECK: hello2
3+
CHECK: foo
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
; RUN: %cat "%S/filecheck.input" | (%FILECHECK_EXEC "%S/filecheck.check" 2>&1 || true) | %FILECHECK_TESTER_EXEC "%s" --match-full-lines
1+
RUN: %cat "%S/filecheck.input" | (%FILECHECK_EXEC "%S/filecheck.check" 2>&1 || true) | %FILECHECK_TESTER_EXEC "%s" --match-full-lines --strict-whitespace
22

3-
; CHECK: {{.*filecheck.check:3:10: error: CHECK: expected string not found in input$}}
4-
; CHECK: {{^}}; CHECK: foo{{$}}
5-
; CHECK: {{^}} ^{{$}}
6-
; CHECK: {{^<stdin>:.*:.*: note: scanning from here$}}
7-
; CHECK: hello3
8-
; CHECK: ^{{$}}
9-
; CHECK: {{^<stdin>:.*:.*: note: possible intended match here$}}
10-
; CHECK: hello3
11-
; CHECK: ^
12-
; CHECK-EMPTY:
3+
CHECK:{{.*filecheck.check:3:8: error: CHECK: expected string not found in input$}}
4+
CHECK-NEXT:CHECK: foo
5+
CHECK-NEXT: ^
6+
CHECK-NEXT:{{^<stdin>:.*:.*: note: scanning from here$}}
7+
CHECK-NEXT:hello3
8+
CHECK-NEXT:^
9+
CHECK-NEXT:{{^<stdin>:.*:.*: note: possible intended match here$}}
10+
CHECK-NEXT:hello3
11+
CHECK-NEXT: {{ ?}}^
12+
CHECK-EMPTY:

0 commit comments

Comments
 (0)