aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-01-21 00:37:29 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2020-04-30 20:41:29 +0100
commitf867bfbce07aae6ed7a5b38c583490af3ea13af9 (patch)
tree48e1af9f16db8f1b26570a99bfdec1a17f1acc67 /docs/markdown
parentb647ce1b63961a76a6de63a3586015a4c5d56b44 (diff)
downloadmeson-f867bfbce07aae6ed7a5b38c583490af3ea13af9.zip
meson-f867bfbce07aae6ed7a5b38c583490af3ea13af9.tar.gz
meson-f867bfbce07aae6ed7a5b38c583490af3ea13af9.tar.bz2
Add a mechanism for validating meson output in tests
Expected stdout lines must match lines from the actual stdout, in the same order. Lines with match type 're' are regex matched. v2: Ignore comment lines in expected_stdout v3: Automatically adjust path separators for location in expected output v4: Put expected stdout in test.json, rather than a separate file
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Contributing.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/markdown/Contributing.md b/docs/markdown/Contributing.md
index 8a24e0b..34cd8ca 100644
--- a/docs/markdown/Contributing.md
+++ b/docs/markdown/Contributing.md
@@ -334,6 +334,27 @@ If a tool is specified, it has to be present in the environment, and the version
requirement must be fulfilled match. Otherwise, the entire test is skipped
(including every element in the test matrix).
+#### stdout
+
+The `stdout` key contains a list of dicts, describing the expected stdout.
+
+Each dict contains the following keys:
+
+- `line`
+- `match` (optional)
+
+Each item in the list is matched, in order, against the remaining actual stdout
+lines, after any previous matches. If the actual stdout is exhausted before
+every item in the list is matched, the expected output has not been seen, and
+the test has failed.
+
+The `match` element of the dict determines how the `line` element is matched:
+
+| Type | Description |
+| -------- | ----------------------- |
+| `literal` | Literal match (default) |
+| `re` | regex match |
+
### Skipping integration tests
Meson uses several continuous integration testing systems that have slightly