]> Sergey Matveev's repositories - bfs.git/blobdiff - tests/posix/exec_nonexistent.sh
tests: Fix Bash 3 compatibility
[bfs.git] / tests / posix / exec_nonexistent.sh
index 901be861441d02d6cfefb434d700fc55ba59d32f..a9ff052b30dbbcd3210b58cf180fa59f69b7285c 100644 (file)
@@ -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"