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
4 changes: 4 additions & 0 deletions filecheck/FileCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ def implicit_check_line(check_not_check, strict_mode, line):


def main():
# Force UTF-8 to be sent to stdout.
# https://stackoverflow.com/a/3597849/598057
sys.stdout = open(1, 'w', encoding='utf-8', closefd=False)

args = None
input_lines = None

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHECK: Match line that does not exist in input.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# © A line with UTF-8 produces
# vadsэавфыаЭХÜÜÄ
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
RUN: %cat "%S/sample.input" | \
RUN: %expect_exit 1 %FILECHECK_EXEC "%S/sample.check" --dump-input=fail | \
RUN: %FILECHECK_TESTER_EXEC "%s" \
RUN: --strict-whitespace \
RUN: --match-full-lines

CHECK:{{.*}}/sample.check:1:8: error: CHECK: expected string not found in input
CHECK:{{.*}}CHECK: Match line that does not exist in input.
CHECK:{{.*}}<stdin>:1:1: note: scanning from here
CHECK:{{.*}}# © A line with UTF-8 produces
CHECK:{{.*}}# vadsэавфыаЭХÜÜÄ
4 changes: 4 additions & 0 deletions tests/integration/tools/expect_exit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import subprocess
import sys

# Force UTF-8 to be sent to stdout.
# https://stackoverflow.com/a/3597849/598057
sys.stdout = open(1, 'w', encoding='utf-8', closefd=False)

if len(sys.argv) <= 2:
print("error: expect_exit: expect arguments to be provided")
exit(1)
Expand Down