Skip to content

Commit

Permalink
Merge pull request #152 from mull-project/develop
Browse files Browse the repository at this point in the history
docs and examples: remove semicolons
  • Loading branch information
stanislaw authored Nov 17, 2020
2 parents 5f50a0e + 1027347 commit 65c0d93
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 93 deletions.
16 changes: 8 additions & 8 deletions docs/03-tutorial-hello-world.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
^
<stdin>:1:1: note: scanning from here
What is FileCheck
^
Expand All @@ -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:

Expand All @@ -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$}}
^
<stdin>:1:1: note: scanning from here
Hello world Hello world
^
Expand Down
14 changes: 7 additions & 7 deletions docs/04-tutorial-lit-and-filecheck.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdio.h>
Expand Down Expand Up @@ -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 <stdio.h>
Expand Down Expand Up @@ -137,9 +137,9 @@ Produces more output:
-- Testing: 1 tests, single process --
FAIL: <unnamed> :: 02-fail.c (1 of 1)
******************** TEST '<unnamed> :: 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
^
<stdin>:1:1: note: scanning from here
Hello world
...
Expand Down
8 changes: 4 additions & 4 deletions docs/06-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions docs/08-known-issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
^
<stdin>:1:1: note: scanning from here
String1
^
Original file line number Diff line number Diff line change
@@ -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:<stdin>:1:8: note: scanning from here
; CHECK:String1
; CHECK: ^
; CHECK-EMPTY:
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,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: <stdin>: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: <stdin>:2:1: note: scanning from here
CHECK-EMPTY:
CHECK: ^
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -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:<stdin>:1:8: note: scanning from here
; CHECK:String1
; CHECK: ^
; CHECK-EMPTY:
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,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: <stdin>: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: <stdin>:2:1: note: scanning from here
CHECK: String2
CHECK: ^
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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: <stdin>:3:1: note: 'next' match was here
; CHECK: String2
; CHECK: ^
; CHECK: <stdin>:1:8: note: previous match ended here
; CHECK: String1
; CHECK: ^
; CHECK: <stdin>: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: <stdin>:3:1: note: 'next' match was here
CHECK: String2
CHECK: ^
CHECK: <stdin>:1:8: note: previous match ended here
CHECK: String1
CHECK: ^
CHECK: <stdin>:2:1: note: non-matching line after previous match is here
CHECK: foo
CHECK: ^
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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: <stdin>: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: <stdin>:1:1: note: found here
CHECK: String3
CHECK: ^~~~~~~
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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 <stdin>: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 <stdin>:1:8: note: scanning from here
TODO
CHECK String1
CHECK: ^
CHECK-EMPTY:
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 65c0d93

Please sign in to comment.