summaryrefslogtreecommitdiffstats
path: root/tests/posix/exec_nonexistent.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-23 11:42:33 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-23 13:00:21 -0400
commitde8e0fbb8c1e59b3f1af72a07477b63a8f0bbc75 (patch)
tree4ab177ebe2342103eeca4d721d6a810b58ef99fc /tests/posix/exec_nonexistent.sh
parent4c7a49a83e082a7bfff85a9305882f0912655123 (diff)
downloadbfs-de8e0fbb8c1e59b3f1af72a07477b63a8f0bbc75.tar.xz
tests: Fix Bash 3 compatibility
Diffstat (limited to 'tests/posix/exec_nonexistent.sh')
-rw-r--r--tests/posix/exec_nonexistent.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/posix/exec_nonexistent.sh b/tests/posix/exec_nonexistent.sh
index 901be86..a9ff052 100644
--- a/tests/posix/exec_nonexistent.sh
+++ b/tests/posix/exec_nonexistent.sh
@@ -1,7 +1,4 @@
# 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" ]
-
-! bfs_diff basic -print -exec "$TESTS/nonexistent" {} \; -print
+bfs_diff basic -print -exec "$TESTS/nonexistent" {} \; -print 2>"$TEST/err" && fail
+test -s "$TEST/err"