diff options
| author | Michael Hoang <enzime@users.noreply.github.com> | 2024-10-24 23:55:25 +1100 |
|---|---|---|
| committer | Michael Hoang <enzime@users.noreply.github.com> | 2024-10-27 21:26:19 +1100 |
| commit | fd6660cb9182fde5e593246e311dc3c2dd4b9d13 (patch) | |
| tree | b4ff5faff0098a1cd0e4a6f7e18109ecf69a5b6b /modules/programs | |
| parent | 2eb472230a5400c81d9008014888b4bff23bcf44 (diff) | |
tests: fix negative asserts with `grep` not working
Using `grep -v` without `-z` will return 0 even if there is a match
found as all the non-matching lines will be matched. Instead of using
`grep -vqz`, `(! grep ...)` is more readable.
The brackets are necessary as `! grep` will not trigger `set -e`[0], so we
run it inside a subshell to use its non-zero exit code.
[0]: https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#The-Set-Builtin
Diffstat (limited to 'modules/programs')
0 files changed, 0 insertions, 0 deletions
