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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.venv
__pycache__
*.egg-info
dist

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test-lit: test-lit-real test-lit-py ## Run tests against both FileCheck C++ and
@echo "Have run both real FileCheck C++ and FileCheck.py tests."
endif

FILECHECK_PY_EXEC=$(PWD)/src/FileCheck
FILECHECK_PY_EXEC=$(PWD)/filecheck/FileCheck.py
test-lit-py: ## Run tests against FileCheck.py.
@echo "--- Running integration tests against FileCheck.py ---"
cd tests/integration && make clean
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[tool.poetry]
name = "filecheck"
version = "0.0.1"
description = "Python port of LLVM's FileCheck, flexible pattern matching file verifier"
authors = ["Stanislav Pankevich <s.pankevich@gmail.com>"]

[tool.poetry.dependencies]
python = "^3.4"

[tool.poetry.dev-dependencies]
lit = "^0.9"

[tool.poetry.scripts]
filecheck = "filecheck.FileCheck:main"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 2) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: {{.*}}filecheck.check:1:3: error: found 'CHECK-EMPTY' without previous 'CHECK: line{{$}}
; CHECK: {{^}}; CHECK-EMPTY:{{$}}
; CHECK: {{^}} ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 0) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 0) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1;) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK:{{.*}}filecheck.check:2:15: error: CHECK-NEXT: expected string not found in input
; CHECK:; CHECK-NEXT: foo
; CHECK: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1;) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT:{{.*}}filecheck.check:2:15: error: CHECK-NEXT: is not on the line after the previous match{{$}}
; CHECK-NEXT:; CHECK-NEXT: string 3
; CHECK-NEXT: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? == 1;) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT:{{^.*}}filecheck.check:1:14: error: CHECK-NOT: excluded string found in input{{$}}
; CHECK-NEXT:; CHECK-NOT: hello
; CHECK-NEXT: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? == 1;) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT:{{^.*}}filecheck.check:1:14: error: CHECK-NOT: excluded string found in input{{$}}
; CHECK-NEXT:{{^; CHECK-NOT: hello world$}}
; CHECK-NEXT:{{^ \^$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? == 1;) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT: {{^.*}}filecheck.check:1:14: error: CHECK-NOT: excluded string found in input{{$}}
; TODO: Here we could do a better match.
; CHECK-NEXT: {{^; CHECK-NOT: ...h.l.o...$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1;) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT:{{^.*}}filecheck.check:1:14: 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.....$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? == 0;) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? == 0;) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1;) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK:{{.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; CHECK:{{^}}; CHECK: foo{{$}}
; CHECK:{{^}} ^{{$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT:{{.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; CHECK-NEXT:{{^; CHECK: .....hello.....$}}
; CHECK-NEXT:{{^ \^$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT:{{.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; CHECK-NEXT:{{^; CHECK: .....hello.....$}}
; CHECK-NEXT:{{^ \^$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT: {{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
; CHECK-NEXT: {{^}}; CHECK: foo{{$}}
; CHECK-NEXT: {{^}} ^{{$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1 || true) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: {{.*filecheck.check:2:10: error: CHECK: expected string not found in input$}}
; CHECK: {{^}}; CHECK: foo{{$}}
; CHECK: {{^}} ^{{$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1 || true) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: {{.*filecheck.check:3:10: error: CHECK: expected string not found in input$}}
; CHECK: {{^}}; CHECK: foo{{$}}
; CHECK: {{^}} ^{{$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT: {{.*filecheck.check:1:.*: error: CHECK: expected string not found in input$}}
; CHECK-NEXT: {{^}}; CHECK: foo{{$}}
; CHECK-NEXT: {{^}} ^{{$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1 || true) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: {{.*filecheck.check:2:10: error: CHECK: expected string not found in input$}}
; CHECK: {{^}}; CHECK: foo{{$}}
; CHECK: {{^}} ^{{$}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: (%FILECHECK_EXEC 2>&1; test $? = 2) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-NEXT: <check-file> not specified
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: (%FILECHECK_EXEC file/does/not/exist 2>&1; test $? = 2) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: Could not open check file 'file/does/not/exist': No such file or directory
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: echo "" | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 2) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: error: no check strings found with prefix 'CHECK:'
; CHECK-EMPTY
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: echo "" | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 2) | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: error: no check strings found with prefix 'CHECK:'
; CHECK-EMPTY
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check --check-prefix STRING2 | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check --check-prefix STRING3 | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --check-prefix FOO 2>&1; test $? = 2) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK:error: no check strings found with prefix 'FOO:'
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --check-prefix "GARBAGE1.23.4.2" 2>&1; test $? = 2) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK:Supplied check-prefix is invalid! Prefixes must be unique and start with a letter and contain only alphanumeric characters, hyphens and underscores
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --match-full-lines 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK:{{^.*}}filecheck.check:1:14: error: CHECK-NOT: excluded string found in input{{$}}
; CHECK:; CHECK-NOT: hello world
; CHECK: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines -check-prefix=NO_OPTION
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --match-full-lines 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace -check-prefix=OPTION

; NO_OPTION: {{^.*}}FileCheck{{$}}
; NO_OPTION: {{^.*}}FileCheck{{(\.py)?$}}
; NO_OPTION-EMPTY:

; OPTION:{{^.*}}FileCheck{{$}}
; OPTION:{{^.*}}FileCheck{{(\.py)?$}}
; OPTION:{{^.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; OPTION:; CHECK: hello world
; OPTION: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check --match-full-lines | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK-EMPTY
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --match-full-lines --strict-whitespace 2>&1; test $? = 0;) | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --match-full-lines --strict-whitespace 2>&1; test $? = 0;) | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --match-full-lines --strict-whitespace 2>&1; test $? = 1;) | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; TODO: Is this FileCheck bug? (caret is -1 wrong and therefore position is either 9 or 10)
; CHECK:{{^.*filecheck.check:1:(9|10): error: CHECK: expected string not found in input$}}
; CHECK:; CHECK: hello world
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --match-full-lines --strict-whitespace 2>&1; test $? = 1;) | %FILECHECK_TESTER_EXEC %s --match-full-lines --strict-whitespace

; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; TODO: Is this FileCheck bug? (caret is -1 wrong and therefore position is either 9 or 10)
; CHECK:{{^.*filecheck.check:1:(9|10): error: CHECK: expected string not found in input$}}
; TODO: Improve regex match:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines -check-prefix=NO_OPTION
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --strict-whitespace 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --match-full-lines -check-prefix=OPTION

; NO_OPTION: {{^.*}}FileCheck{{$}}
; NO_OPTION: {{^.*}}FileCheck{{(\.py)?$}}
; NO_OPTION-EMPTY:

; OPTION: {{^.*}}FileCheck{{$}}
; OPTION: {{^.*}}FileCheck{{(\.py)?$}}
; OPTION: {{^.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; OPTION: ; CHECK: hello world hello world
; OPTION: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines -check-prefix=NO_OPTION
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --strict-whitespace 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines -check-prefix=OPTION

; NO_OPTION: {{^.*}}FileCheck{{$}}
; NO_OPTION: {{^.*}}FileCheck{{(\.py)?$}}
; NO_OPTION-EMPTY:

; OPTION:{{^.*}}FileCheck{{$}}
; OPTION:{{^.*}}FileCheck{{(\.py)?$}}
; OPTION:{{^.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; OPTION:; CHECK: hello world hello world
; OPTION: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines -check-prefix=NO_OPTION
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --strict-whitespace 2>&1; test $? = 0) | %FILECHECK_TESTER_EXEC %s --match-full-lines -check-prefix=OPTION

; NO_OPTION:{{^.*}}FileCheck{{$}}
; NO_OPTION:{{^.*}}FileCheck{{(\.py)?$}}
; NO_OPTION:{{^.*}}filecheck.check:1:14: error: CHECK-NOT: excluded string found in input{{$}}
; NO_OPTION:; CHECK-NOT: hello world hello world
; NO_OPTION: ^
Expand All @@ -10,5 +10,5 @@
; NO_OPTION:^~~~~~~~~~~~~~~~~~~~~~~
; NO_OPTION-EMPTY:

; OPTION: {{^.*}}FileCheck{{$}}
; OPTION: {{^.*}}FileCheck{{(\.py)?$}}
; OPTION-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines -check-prefix=NO_OPTION
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check --strict-whitespace 2>&1; test $? = 1) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines -check-prefix=OPTION

; NO_OPTION: {{^.*}}FileCheck{{$}}
; NO_OPTION: {{^.*}}FileCheck{{(\.py)?$}}
; NO_OPTION-EMPTY:

; OPTION:{{^.*}}FileCheck{{$}}
; OPTION:{{^.*}}FileCheck{{(\.py)?$}}
; OPTION:{{^.*}}filecheck.check:1:10: error: CHECK: expected string not found in input{{$}}
; OPTION:; CHECK: hello world hello world
; OPTION: ^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | %FILECHECK_EXEC %S/filecheck.check | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{$}}
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
; RUN: cat %S/filecheck.input | (%FILECHECK_EXEC %S/filecheck.check 2>&1; test $? = 0;) | %FILECHECK_TESTER_EXEC %s --strict-whitespace --match-full-lines
; CHECK:{{^.*}}FileCheck{{$}}
; CHECK:{{^.*}}FileCheck{{(\.py)?$}}
; CHECK-EMPTY: