[cli-tests] Add --set-exact-output to update the expected output

`./run.py --set-exact-output` will update `stdout.expect` and
`stderr.expect` to match the expected output. This doesn't apply to
outputs which use `.glob` or `.ignore`.
This commit is contained in:
Nick Terrell
2022-12-21 17:21:09 -08:00
parent b6e8112261
commit 7df6e25b85
2 changed files with 25 additions and 3 deletions
+10
View File
@@ -45,6 +45,16 @@ Examples:
./run.py --preserve --verbose basic/help.sh
```
### Updating exact output
If a test is failing because a `.stderr.exact` or `.stdout.exact` no longer matches, you can re-run the tests with `--set-exact-output` and the correct output will be written.
Example:
```
./run.py --set-exact-output
./run.py basic/help.sh --set-exact-output
```
## Writing a test
Test cases are arbitrary executables, and can be written in any language, but are generally shell scripts.