Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK-NOT: {{^h.l.o$}}
CHECK-NOT: {{^h.l.o$}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines --strict-whitespace

; CHECK: {{^.*}}filecheck.check:1:14: error: CHECK-NOT: excluded string found in input{{$}}
CHECK:{{^.*}}filecheck.check:1:12: error: CHECK-NOT: excluded string found in input{{$}}
; TODO: Here we could do a better match.
; CHECK-NEXT: {{^; CHECK-NOT: ...h.l.o...$}}
CHECK-NEXT:{{^CHECK-NOT: ...h.l.o...$}}
; TODO: Real FileCheck ignores whitespaces even when regex is passed.
; TODO: The next step is to check the --strict-whitespace option.
; CHECK-NEXT: {{^ \^$}}
; CHECK-NEXT: {{^<stdin>:.*:.*: note: found here$}}
; CHECK-NEXT: {{^}}hello{{$}}
; CHECK-NEXT: {{^}}^~~~~{{$}}
; CHECK-EMPTY:
CHECK-NEXT: ^
CHECK-NEXT:{{^<stdin>:.*:.*: note: found here$}}
CHECK-NEXT:hello
CHECK-NEXT:^~~~~
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK-NOT: {{^}}The following braces must be escaped by FileCheck: ( inside braces ): 0/1{{$}}
CHECK-NOT: {{^}}The following braces must be escaped by FileCheck: ( inside braces ): 0/1{{$}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines

; CHECK:{{^.*}}filecheck.check:1:14: error: CHECK-NOT: excluded string found in input{{$}}
CHECK:{{^.*}}filecheck.check:1:12: error: CHECK-NOT: excluded string found in input{{$}}
; TODO: Here we could do a better match.
; CHECK-NEXT:{{^; CHECK-NOT: .....The following braces must be escaped by FileCheck: \( inside braces \): 0\/1.....$}}
CHECK-NEXT:{{^CHECK-NOT: .....The following braces must be escaped by FileCheck: \( inside braces \): 0\/1.....$}}
; TODO: Real FileCheck ignores whitespaces even when regex is passed.
; TODO: The next step is to check the --strict-whitespace option.
; CHECK-NEXT:{{^ \^$}}
; CHECK-NEXT:{{^<stdin>:1:1: note: found here$}}
; CHECK-NEXT:{{^}}The following braces must be escaped by FileCheck: ( inside braces ): 0/1{{$}}
; CHECK-NEXT:{{^}}^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{{$}}
; CHECK-EMPTY:
CHECK-NEXT:{{^ \^$}}
CHECK-NEXT:{{^<stdin>:1:1: note: found here$}}
CHECK-NEXT:{{^}}The following braces must be escaped by FileCheck: ( inside braces ): 0/1{{$}}
CHECK-NEXT:{{^}}^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{{$}}
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK-NOT: hello
CHECK-NOT: hello
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/filecheck.check"
RUN: %cat "%S/filecheck.input" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/filecheck.check"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; CHECK: string1
; CHECK-NOT: hello
; CHECK: string2
; CHECK: string3
CHECK: string1
CHECK-NOT: hello
CHECK: string2
CHECK: string3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/filecheck.check"
RUN: %cat "%S/filecheck.input" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/filecheck.check"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK-NOT: {{hello}}
CHECK-NOT: {{hello}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK:{{STRINGGG}}
CHECK:{{STRINGGG}}
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" --strict-whitespace --match-full-lines | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" --strict-whitespace --match-full-lines | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines

; CHECK:{{^.*}}filecheck.check:1:9: error: CHECK: expected string not found in input
; CHECK-NEXT:{{^; CHECK:..STRINGGG..$}}
; CHECK-NEXT:{{^ \^$}}
; CHECK-NEXT:<stdin>:1:1: note: scanning from here
; CHECK-NEXT:PLACEHOLDER BEFORE 1
; CHECK-NEXT:^
; TODO: Again, the "note: possible intended match here" feature needs revision, #38
; TODO: https://github.com/stanislaw/FileCheck.py/issues/38.
; TODO: Doing (1|17) and ".*\^" for now.
; CHECK-NEXT:<stdin>:5:{{(1|4)}}: note: possible intended match here
; CHECK-NEXT:STRING
; CHECK-NEXT:{{^.*\^$}}
; CHECK-EMPTY:
CHECK:{{^.*}}filecheck.check:1:7: error: CHECK: expected string not found in input
CHECK-NEXT:{{^CHECK:..STRINGGG..$}}
CHECK-NEXT:{{^ \^$}}
CHECK-NEXT:<stdin>:1:1: note: scanning from here
CHECK-NEXT:PLACEHOLDER BEFORE 1
CHECK-NEXT:^

TODO: Again, the "note: possible intended match here" feature needs revision, #38
TODO: https://github.com/stanislaw/FileCheck.py/issues/38.
TODO: Doing (1|17) and ".*\^" for now.
CHECK-NEXT:<stdin>:5:{{(1|4)}}: note: possible intended match here
CHECK-NEXT:STRING
CHECK-NEXT:{{^.*\^$}}
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK: foo
CHECK: foo
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines

; CHECK:{{.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; CHECK:{{^}}; CHECK: foo{{$}}
; CHECK:{{^}} ^{{$}}
; CHECK:<stdin>:1:1: note: scanning from here
; CHECK:hello
; CHECK:^
; CHECK:<stdin>:1:3: note: possible intended match here
; CHECK:hello
; CHECK: ^
; CHECK-EMPTY
CHECK:{{.*}}filecheck.check:1:8: error: CHECK: expected string not found in input{{$}}
CHECK:{{^}}CHECK: foo{{$}}
CHECK:{{^}} ^{{$}}
CHECK:<stdin>:1:1: note: scanning from here
CHECK:hello
CHECK:^
CHECK:<stdin>:1:3: note: possible intended match here
CHECK:hello
CHECK: ^
CHECK-EMPTY
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK: {{^}}hello{{$}}
CHECK: {{^}}hello{{$}}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines

; CHECK:{{.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; CHECK-NEXT:{{^; CHECK: .....hello.....$}}
; CHECK-NEXT:{{^ \^$}}
; CHECK-NEXT:<stdin>:1:1: note: scanning from here
; CHECK-NEXT:h e llo
; CHECK-NEXT:^
; CHECK-EMPTY:
CHECK:{{.*}}filecheck.check:1:8: error: CHECK: expected string not found in input{{$}}
CHECK-NEXT:{{^CHECK: .....hello.....$}}
CHECK-NEXT:{{^ \^$}}
CHECK-NEXT:<stdin>:1:1: note: scanning from here
CHECK-NEXT:h e llo
CHECK-NEXT:^
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK: {{^}}hello{{$}}
CHECK: {{^}}hello{{$}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines

; CHECK:{{.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; CHECK-NEXT:{{^; CHECK: .....hello.....$}}
; CHECK-NEXT:{{^ \^$}}
; TODO: It is weird that FileCheck C++ eats whitespaces and therefore does not
; TODO: show original line which was not possible to match.
; TODO: We prefer to print original lines, so regex below accommodates this.
; CHECK-NEXT:{{^<stdin>:1:(1|2): note: scanning from here$}}
; CHECK-NEXT:{{^ ( )?h e llo$}}
; CHECK-NEXT:{{^ ?\^$}}
; CHECK-EMPTY:
CHECK:{{.*}}filecheck.check:1:8: error: CHECK: expected string not found in input{{$}}
CHECK-NEXT:{{^CHECK: .....hello.....$}}
CHECK-NEXT:{{^ \^$}}

TODO: It is weird that FileCheck C++ eats whitespaces and therefore does not
TODO: show original line which was not possible to match.
TODO: We prefer to print original lines, so regex below accommodates this.
CHECK-NEXT:{{^<stdin>:1:(1|2): note: scanning from here$}}
CHECK-NEXT:{{^ ( )?h e llo$}}
CHECK-NEXT:{{^ ?\^$}}
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines
RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --strict-whitespace --match-full-lines

; CHECK:{{^.*}}filecheck.check:2:8: error: CHECK: expected string not found in input{{$}}
; CHECK:CHECK: String2
; CHECK: ^
; CHECK:<stdin>:1:8: note: scanning from here
; CHECK:String1
; CHECK: ^
; CHECK-EMPTY:
CHECK:{{^.*}}filecheck.check:2:8: error: CHECK: expected string not found in input{{$}}
CHECK:CHECK: String2
CHECK: ^
CHECK:<stdin>:1:8: note: scanning from here
CHECK:String1
CHECK: ^
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK: hello
CHECK: hello
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK: three different words
CHECK: three different words
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK: {{^}}hello{{$}}
CHECK: {{^}}hello{{$}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
; CHECK: {{^}}The following braces must be escaped by FileCheck: ( inside braces ): 0/1{{$}}
CHECK: {{^}}The following braces must be escaped by FileCheck: ( inside braces ): 0/1{{$}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; CHECK: hello1
; CHECK: hello2
; CHECK: hello3
CHECK: hello1
CHECK: hello2
CHECK: hello3
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; CHECK: hello1
; CHECK: hello2
; CHECK: hello3
CHECK: hello1
CHECK: hello2
CHECK: hello3