diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-12-16 15:32:04 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-12-16 15:32:04 -0500 |
commit | e50c19f284dad6b4b7b79f91cc8576a97626be8a (patch) | |
tree | 3fc7b15a412d4123d403bca6fdbf3225389926e1 /tests/posix/exec_nonexistent.sh | |
parent | 7d87b96b421b76e387cee903b7b7c1bc16c54310 (diff) | |
download | bfs-e50c19f284dad6b4b7b79f91cc8576a97626be8a.tar.xz |
tests: Turn on set -e
Diffstat (limited to 'tests/posix/exec_nonexistent.sh')
-rw-r--r-- | tests/posix/exec_nonexistent.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/posix/exec_nonexistent.sh b/tests/posix/exec_nonexistent.sh index b4e08e0..d4ad92a 100644 --- a/tests/posix/exec_nonexistent.sh +++ b/tests/posix/exec_nonexistent.sh @@ -1,8 +1,7 @@ # Failure to execute the command should lead to an error message and # non-zero exit status. See https://unix.stackexchange.com/q/704522/56202 -stderr=$(invoke_bfs basic -exec "$TESTS/nonexistent" {} \; 2>&1 >/dev/null) -[ -n "$stderr" ] || return 1 +! stderr=$(invoke_bfs basic -exec "$TESTS/nonexistent" {} \; 2>&1 >/dev/null) +[ -n "$stderr" ] -bfs_diff basic -print -exec "$TESTS/nonexistent" {} \; -print -(($? == EX_BFS)) +check_exit $EX_BFS bfs_diff basic -print -exec "$TESTS/nonexistent" {} \; -print |