Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Hello World: minor fixes #40

Merged
merged 1 commit into from
Nov 30, 2019
Merged
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
15 changes: 9 additions & 6 deletions docs/03-tutorial-hello-world.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,19 @@ the check file:
.. code-block:: bash

$ echo "Hello world" | filecheck hello-world.check
/usr/local/bin/FileCheck
/usr/local/bin/filecheck
$ echo $?
0

**Note:** By convention, original LLVM's ``FileCheck`` always prints a full
path to its executable and ``FileCheck.py`` follows this convention.

If we provide give an invalid output we will see an error message:

.. code-block:: bash

$ echo "What is FileCheck" | filecheck hello-world.check
/usr/local/bin/FileCheck
/usr/local/bin/filecheck
examples/hello-world.check:1:10: error: CHECK: expected string not found in input
; CHECK: Hello world
^
Expand All @@ -75,17 +78,17 @@ Let's run it with a valid input:

.. code-block:: bash

echo "Hello world" | ./src/FileCheck examples/hello-world-regex.check
/usr/local/bin/FileCheck
echo "Hello world" | filecheck examples/hello-world-regex.check
/usr/local/bin/filecheck
$ echo $?
0

With invalid input:

.. code-block:: bash

$ echo "Hello world Hello world" | ./src/FileCheck examples/hello-world-regex.check
/usr/local/bin/FileCheck
$ 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$}}
^
Expand Down