-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use non-greedy match when matching for CHECK: lines
This implements some part of the #145.
- Loading branch information
Showing
7 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...commands/CHECK/one_string/positive-match/05-CHECK-two-times-matches-first/filecheck.check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
; CHECK:{{^.*filecheck.check:1:(9|10): error: CHECK: expected string not found in input$}} |
1 change: 1 addition & 0 deletions
1
...commands/CHECK/one_string/positive-match/05-CHECK-two-times-matches-first/filecheck.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
A-very-long-path/filecheck.check:1:9: error: CHECK: expected string not found in input |
1 change: 1 addition & 0 deletions
1
...ck_commands/CHECK/one_string/positive-match/05-CHECK-two-times-matches-first/sample.itest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
; RUN: %cat "%S/filecheck.input" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/filecheck.check" |
2 changes: 2 additions & 0 deletions
2
...ests/check_commands/CHECK/two_strings/04-wip-negative_match_second_string/filecheck.check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
; CHECK: hello1 | ||
; CHECK: foo |
2 changes: 2 additions & 0 deletions
2
...ests/check_commands/CHECK/two_strings/04-wip-negative_match_second_string/filecheck.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
hello1 | ||
hello2 |
12 changes: 12 additions & 0 deletions
12
...n/tests/check_commands/CHECK/two_strings/04-wip-negative_match_second_string/sample.itest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
; RUN: %cat "%S/filecheck.input" | %expect_exit 1 %FILECHECK_EXEC "%S/filecheck.check" | %FILECHECK_TESTER_EXEC "%s" --match-full-lines | ||
|
||
; CHECK: {{.*filecheck.check:2:10: error: CHECK: expected string not found in input$}} | ||
; CHECK: {{^}}; CHECK: foo{{$}} | ||
; CHECK: {{^}} ^{{$}} | ||
; CHECK: {{^<stdin>:.*:.*: note: scanning from here$}} | ||
; CHECK: hello2 | ||
; CHECK: ^{{$}} | ||
; CHECK: {{^<stdin>:.*:.*: note: possible intended match here$}} | ||
; CHECK: hello2 | ||
; CHECK: ^ | ||
; CHECK-EMPTY: |