summaryrefslogtreecommitdiff
path: root/tests/README.md
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-12-15 11:12:38 +0100
committerLaurenz <laurmaedje@gmail.com>2021-12-15 11:12:38 +0100
commit57f5c0a1b15775f9500335f455c7dc7d70cea9f5 (patch)
tree1448c12ba70acd3bcd96aea973a511641497f3de /tests/README.md
parentae38be9097bbb32142ef776e77e627ac12379000 (diff)
Set Rules Episode V: The Tests Strike Back
Diffstat (limited to 'tests/README.md')
-rw-r--r--tests/README.md35
1 files changed, 33 insertions, 2 deletions
diff --git a/tests/README.md b/tests/README.md
index 57d47fe2..7343d868 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -15,9 +15,19 @@ Running the integration tests (the tests in this directory).
cargo test --test typeset
```
-Running all tests whose names contain the word `filter`.
+Running all tests whose paths contain the string `page` or `stack`.
```bash
-cargo test --test typeset filter
+cargo test --test typeset page stack
+```
+
+Running a test with the exact filename `page.typ`.
+```bash
+cargo test --test typeset -- --exact page.typ
+```
+
+Debug-printing the layout trees for all executed tests.
+```bash
+cargo test --test typeset -- --debug empty.typ
```
To make the integration tests go faster they don't generate PDFs by default.
@@ -39,3 +49,24 @@ oxipng -o max path/to/image.png
# All images
oxipng -r -o max tests/ref
```
+
+## Shorthand for running tests
+If you want to have a quicker way to run the tests, consider adding a shortcut
+to your shell profile so that you can simply write something like:
+```bash
+tests --debug empty.typ
+```
+
+### PowerShell
+Open your PowerShell profile by executing `notepad $profile`.
+```ps
+function tests {
+ cargo test --test typeset -- $args
+}
+```
+
+### Bash
+Open your Bash configuration by executing `nano ~/.bashrc`.
+```bash
+alias tests="cargo test --test typeset --"
+```