From 10273472a0361d61317ffc0006385542f6d26484 Mon Sep 17 00:00:00 2001 From: Stanislav Pankevich Date: Tue, 17 Nov 2020 22:41:38 +0100 Subject: [PATCH] docs and examples: remove semicolons --- docs/03-tutorial-hello-world.rst | 16 +++++------ docs/04-tutorial-lit-and-filecheck.rst | 14 +++++----- docs/06-options.rst | 8 +++--- docs/08-known-issues.rst | 10 +++---- .../CHECK.itest | 16 +++++------ .../CHECK.itest | 16 +++++------ .../02-edge-case-no-newline-in-py/CHECK.itest | 18 ++++++------ .../CHECK-EMPTY/Failure/CHECK-EMPTY.itest | 16 +++++------ .../CHECK-EMPTY/Success/CHECK-EMPTY.itest | 2 +- .../CHECK-NEXT/Failure/CHECK-NEXT.itest | 28 +++++++++---------- .../CHECK-NEXT/Success/CHECK-NEXT.itest | 2 +- .../CHECK-NOT/Failure/CHECK-NOT.itest | 16 +++++------ .../CHECK-NOT/Success/CHECK-NOT.itest | 2 +- .../check-commands/CHECK/Failure/CHECK.itest | 20 ++++++------- .../check-commands/CHECK/Success/CHECK.itest | 2 +- 15 files changed, 93 insertions(+), 93 deletions(-) diff --git a/docs/03-tutorial-hello-world.rst b/docs/03-tutorial-hello-world.rst index ec26366..a736215 100644 --- a/docs/03-tutorial-hello-world.rst +++ b/docs/03-tutorial-hello-world.rst @@ -31,7 +31,7 @@ Create new file ``hello-world.check`` with the following contents: .. code-block:: text - ; CHECK: Hello world + CHECK: Hello world Now we can provide a valid input to ``filecheck`` which will match it against the check file: @@ -52,9 +52,9 @@ If we provide an invalid output we will see an error message: $ echo "What is FileCheck" | filecheck hello-world.check /usr/local/bin/filecheck - examples/hello-world.check:1:10: error: CHECK: expected string not found in input - ; CHECK: Hello world - ^ + examples/hello-world.check:1:8: error: CHECK: expected string not found in input + CHECK: Hello world + ^ :1:1: note: scanning from here What is FileCheck ^ @@ -72,7 +72,7 @@ Create a new file ``hello-world-regex.check`` with the following contents: .. code-block:: text - ; CHECK: {{^Hello world$}} + CHECK: {{^Hello world$}} Let's run it with a valid input: @@ -89,9 +89,9 @@ With invalid input: $ echo "Hello world Hello world" | filecheck examples/hello-world-regex.check /usr/local/bin/filecheck - examples/hello-world-regex.check:1:10: error: CHECK: expected string not found in input - ; CHECK: {{^Hello world$}} - ^ + examples/hello-world-regex.check:1:8: error: CHECK: expected string not found in input + CHECK: {{^Hello world$}} + ^ :1:1: note: scanning from here Hello world Hello world ^ diff --git a/docs/04-tutorial-lit-and-filecheck.rst b/docs/04-tutorial-lit-and-filecheck.rst index cf187b4..8fc6a79 100644 --- a/docs/04-tutorial-lit-and-filecheck.rst +++ b/docs/04-tutorial-lit-and-filecheck.rst @@ -61,8 +61,8 @@ Test file ``01-pass.c``: .. code-block:: c /** - ; RUN: clang %s -o %S/hello-world && %S/hello-world | filecheck %s - ; CHECK: Hello world + RUN: clang %s -o %S/hello-world && %S/hello-world | filecheck %s + CHECK: Hello world */ #include @@ -94,8 +94,8 @@ Test file ``02-fail.c``: .. code-block:: c /** - ; RUN: clang %s -o %S/hello-world && %S/hello-world | filecheck %s - ; CHECK: Wrong line + RUN: clang %s -o %S/hello-world && %S/hello-world | filecheck %s + CHECK: Wrong line */ #include @@ -137,9 +137,9 @@ Produces more output: -- Testing: 1 tests, single process -- FAIL: :: 02-fail.c (1 of 1) ******************** TEST ' :: 02-fail.c' FAILED ******************** - 02-fail.c:3:10: error: CHECK: expected string not found in input - ; CHECK: Wrong line - ^ + 02-fail.c:3:8: error: CHECK: expected string not found in input + CHECK: Wrong line + ^ :1:1: note: scanning from here Hello world ... diff --git a/docs/06-options.rst b/docs/06-options.rst index 8b687be..0255b1d 100644 --- a/docs/06-options.rst +++ b/docs/06-options.rst @@ -85,10 +85,10 @@ in the same file: .. code-block:: text - ; RUN: printf "String1" | %FILECHECK_EXEC %s --check-prefix STRING1 - ; RUN: printf "String2" | %FILECHECK_EXEC %s --check-prefix STRING2 - ; STRING1: String1 - ; STRING2: String2 + RUN: printf "String1" | %FILECHECK_EXEC %s --check-prefix STRING1 + RUN: printf "String2" | %FILECHECK_EXEC %s --check-prefix STRING2 + STRING1: String1 + STRING2: String2 One usual case is testing of how a program behaves when it is run with or without a specific option. diff --git a/docs/08-known-issues.rst b/docs/08-known-issues.rst index 9bd6435..61e7d0a 100644 --- a/docs/08-known-issues.rst +++ b/docs/08-known-issues.rst @@ -22,17 +22,17 @@ Check file: .. code-block:: text - ; CHECK-NOT:String1 - ; CHECK:String2 + CHECK-NOT:String1 + CHECK:String2 Result: .. code-block:: text /Users/Stanislaw/.pyenv/shims/filecheck - filecheck.check:2:9: error: CHECK: expected string not found in input - ; CHECK:String2 - ^ + filecheck.check:2:7: error: CHECK: expected string not found in input + CHECK:String2 + ^ :1:1: note: scanning from here String1 ^ diff --git a/tests/integration/tests/check_commands/CHECK/failure/09-not-enough-input-for-all-checks/CHECK.itest b/tests/integration/tests/check_commands/CHECK/failure/09-not-enough-input-for-all-checks/CHECK.itest index a4615e3..feb4e33 100644 --- a/tests/integration/tests/check_commands/CHECK/failure/09-not-enough-input-for-all-checks/CHECK.itest +++ b/tests/integration/tests/check_commands/CHECK/failure/09-not-enough-input-for-all-checks/CHECK.itest @@ -1,11 +1,11 @@ -; RUN: %printf "String1" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" --strict-whitespace --match-full-lines +RUN: %printf "String1" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" --strict-whitespace --match-full-lines // TODO: Something wrong with the greediness here: -; CHECK:{{^.*}}CHECK.check:2:8: error: {{CHECK}}: expected string not found in input +CHECK:{{^.*}}CHECK.check:2:8: error: {{CHECK}}: expected string not found in input // TODO: And here: -; CHECK:{{^CHECK}}: String2 -; CHECK: ^ -; CHECK::1:8: note: scanning from here -; CHECK:String1 -; CHECK: ^ -; CHECK-EMPTY: +CHECK:{{^CHECK}}: String2 +CHECK: ^ +CHECK::1:8: note: scanning from here +CHECK:String1 +CHECK: ^ +CHECK-EMPTY: diff --git a/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/01-edge-case-no-newline-in-llvm/CHECK.itest b/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/01-edge-case-no-newline-in-llvm/CHECK.itest index f1865e2..1027f4e 100644 --- a/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/01-edge-case-no-newline-in-llvm/CHECK.itest +++ b/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/01-edge-case-no-newline-in-llvm/CHECK.itest @@ -1,9 +1,9 @@ -; RUN: %printf "String1\n" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" +RUN: %printf "String1\n" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" -; CHECK: {{.*}}CHECK.check:2:8: error: CHECK: expected string not found in input -; CHECK: CHECK: String2 -; CHECK: ^ -; CHECK: :2:1: note: scanning from here -; CHECK-EMPTY: -; CHECK: ^ -; CHECK-EMPTY: +CHECK: {{.*}}CHECK.check:2:8: error: CHECK: expected string not found in input +CHECK: CHECK: String2 +CHECK: ^ +CHECK: :2:1: note: scanning from here +CHECK-EMPTY: +CHECK: ^ +CHECK-EMPTY: diff --git a/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/02-edge-case-no-newline-in-py/CHECK.itest b/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/02-edge-case-no-newline-in-py/CHECK.itest index 20f5a1b..ca504af 100644 --- a/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/02-edge-case-no-newline-in-py/CHECK.itest +++ b/tests/integration/tests/check_commands/CHECK/failure/edge-case-no-newline/02-edge-case-no-newline-in-py/CHECK.itest @@ -1,12 +1,12 @@ -; RUN: %printf "String1\n" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" --strict-whitespace --match-full-lines +RUN: %printf "String1\n" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" --strict-whitespace --match-full-lines // TODO: Something wrong with the greediness here: -; CHECK***:{{^.*}}CHECK.check:2:8: error: CHECK***: expected string not found in input -; CHECK:{{^.*}} +CHECK***:{{^.*}}CHECK.check:2:8: error: CHECK***: expected string not found in input +CHECK:{{^.*}} // TODO: And here: -; CHECK:{{.*}}String2 -; CHECK: ^ -; CHECK::1:8: note: scanning from here -; CHECK:String1 -; CHECK: ^ -; CHECK-EMPTY: +CHECK:{{.*}}String2 +CHECK: ^ +CHECK::1:8: note: scanning from here +CHECK:String1 +CHECK: ^ +CHECK-EMPTY: diff --git a/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Failure/CHECK-EMPTY.itest b/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Failure/CHECK-EMPTY.itest index b449929..01a318c 100644 --- a/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Failure/CHECK-EMPTY.itest +++ b/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Failure/CHECK-EMPTY.itest @@ -1,9 +1,9 @@ -; RUN: %printf "String1\nString2" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK-EMPTY.check" | %FILECHECK_EXEC "%s" +RUN: %printf "String1\nString2" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK-EMPTY.check" | %FILECHECK_EXEC "%s" -; CHECK: {{^.*}}CHECK-EMPTY.check:2:13: error: CHECK-EMPTY: expected string not found in input -; CHECK: CHECK-EMPTY: -; CHECK: ^ -; CHECK: :2:1: note: scanning from here -; CHECK: String2 -; CHECK: ^ -; CHECK-EMPTY: +CHECK: {{^.*}}CHECK-EMPTY.check:2:13: error: CHECK-EMPTY: expected string not found in input +CHECK: CHECK-EMPTY: +CHECK: ^ +CHECK: :2:1: note: scanning from here +CHECK: String2 +CHECK: ^ +CHECK-EMPTY: diff --git a/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Success/CHECK-EMPTY.itest b/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Success/CHECK-EMPTY.itest index 5d93ad5..89f237e 100644 --- a/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Success/CHECK-EMPTY.itest +++ b/tests/integration/tests/examples/check-commands/CHECK-EMPTY/Success/CHECK-EMPTY.itest @@ -1 +1 @@ -; RUN: %printf "String1\n\nString2" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK-EMPTY.check" +RUN: %printf "String1\n\nString2" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK-EMPTY.check" diff --git a/tests/integration/tests/examples/check-commands/CHECK-NEXT/Failure/CHECK-NEXT.itest b/tests/integration/tests/examples/check-commands/CHECK-NEXT/Failure/CHECK-NEXT.itest index 8bd2898..cbffcbf 100644 --- a/tests/integration/tests/examples/check-commands/CHECK-NEXT/Failure/CHECK-NEXT.itest +++ b/tests/integration/tests/examples/check-commands/CHECK-NEXT/Failure/CHECK-NEXT.itest @@ -1,15 +1,15 @@ -; RUN: %printf "String1\nfoo\nString2" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK-NEXT.check" | %FILECHECK_EXEC "%s" +RUN: %printf "String1\nfoo\nString2" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK-NEXT.check" | %FILECHECK_EXEC "%s" -; CHECK: {{.*}}CHECK-NEXT.check:2:13: error: CHECK-NEXT: is not on the line after the previous match -; CHECK: CHECK-NEXT: String2 -; CHECK: ^ -; CHECK: :3:1: note: 'next' match was here -; CHECK: String2 -; CHECK: ^ -; CHECK: :1:8: note: previous match ended here -; CHECK: String1 -; CHECK: ^ -; CHECK: :2:1: note: non-matching line after previous match is here -; CHECK: foo -; CHECK: ^ -; CHECK-EMPTY: +CHECK: {{.*}}CHECK-NEXT.check:2:13: error: CHECK-NEXT: is not on the line after the previous match +CHECK: CHECK-NEXT: String2 +CHECK: ^ +CHECK: :3:1: note: 'next' match was here +CHECK: String2 +CHECK: ^ +CHECK: :1:8: note: previous match ended here +CHECK: String1 +CHECK: ^ +CHECK: :2:1: note: non-matching line after previous match is here +CHECK: foo +CHECK: ^ +CHECK-EMPTY: diff --git a/tests/integration/tests/examples/check-commands/CHECK-NEXT/Success/CHECK-NEXT.itest b/tests/integration/tests/examples/check-commands/CHECK-NEXT/Success/CHECK-NEXT.itest index b7632b4..446d4a8 100644 --- a/tests/integration/tests/examples/check-commands/CHECK-NEXT/Success/CHECK-NEXT.itest +++ b/tests/integration/tests/examples/check-commands/CHECK-NEXT/Success/CHECK-NEXT.itest @@ -1 +1 @@ -; RUN: %printf "String1\nString2" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK-NEXT.check" +RUN: %printf "String1\nString2" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK-NEXT.check" diff --git a/tests/integration/tests/examples/check-commands/CHECK-NOT/Failure/CHECK-NOT.itest b/tests/integration/tests/examples/check-commands/CHECK-NOT/Failure/CHECK-NOT.itest index adcdd82..c5c1916 100644 --- a/tests/integration/tests/examples/check-commands/CHECK-NOT/Failure/CHECK-NOT.itest +++ b/tests/integration/tests/examples/check-commands/CHECK-NOT/Failure/CHECK-NOT.itest @@ -1,8 +1,8 @@ -; RUN: printf "String3" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK-NOT.check" | %FILECHECK_EXEC "%s" -; CHECK: {{.*}}CHECK-NOT.check:3:12: error: CHECK-NOT: excluded string found in input -; CHECK: CHECK-NOT: String3 -; CHECK: ^ -; CHECK: :1:1: note: found here -; CHECK: String3 -; CHECK: ^~~~~~~ -; CHECK-EMPTY: +RUN: printf "String3" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK-NOT.check" | %FILECHECK_EXEC "%s" +CHECK: {{.*}}CHECK-NOT.check:3:12: error: CHECK-NOT: excluded string found in input +CHECK: CHECK-NOT: String3 +CHECK: ^ +CHECK: :1:1: note: found here +CHECK: String3 +CHECK: ^~~~~~~ +CHECK-EMPTY: diff --git a/tests/integration/tests/examples/check-commands/CHECK-NOT/Success/CHECK-NOT.itest b/tests/integration/tests/examples/check-commands/CHECK-NOT/Success/CHECK-NOT.itest index 43874d1..1e0d224 100644 --- a/tests/integration/tests/examples/check-commands/CHECK-NOT/Success/CHECK-NOT.itest +++ b/tests/integration/tests/examples/check-commands/CHECK-NOT/Success/CHECK-NOT.itest @@ -1 +1 @@ -; RUN: %printf "String4" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK-NOT.check" +RUN: %printf "String4" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK-NOT.check" diff --git a/tests/integration/tests/examples/check-commands/CHECK/Failure/CHECK.itest b/tests/integration/tests/examples/check-commands/CHECK/Failure/CHECK.itest index 9ee5be2..cbff638 100644 --- a/tests/integration/tests/examples/check-commands/CHECK/Failure/CHECK.itest +++ b/tests/integration/tests/examples/check-commands/CHECK/Failure/CHECK.itest @@ -1,11 +1,11 @@ -; RUN: printf "String1" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" +RUN: printf "String1" | %expect_exit 1 %FILECHECK_EXEC "%S/CHECK.check" | %FILECHECK_EXEC "%s" -; CHECK: {{.*}}CHECK.check:2:8: error: CHECK: expected string not found in input -; CHECK: CHECK: String2 -; CHECK: ^ -; TODO -; CHECK :1:8: note: scanning from here -; TODO -; CHECK String1 -; CHECK: ^ -; CHECK-EMPTY: +CHECK: {{.*}}CHECK.check:2:8: error: CHECK: expected string not found in input +CHECK: CHECK: String2 +CHECK: ^ +TODO +CHECK :1:8: note: scanning from here +TODO +CHECK String1 +CHECK: ^ +CHECK-EMPTY: diff --git a/tests/integration/tests/examples/check-commands/CHECK/Success/CHECK.itest b/tests/integration/tests/examples/check-commands/CHECK/Success/CHECK.itest index 9778114..6e3056d 100644 --- a/tests/integration/tests/examples/check-commands/CHECK/Success/CHECK.itest +++ b/tests/integration/tests/examples/check-commands/CHECK/Success/CHECK.itest @@ -1 +1 @@ -; RUN: printf "String1\nString2\nString3" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK.check" +RUN: printf "String1\nString2\nString3" | %expect_exit 0 --expect-no-content %FILECHECK_EXEC "%S/CHECK.check"