summaryrefslogtreecommitdiffstats
path: root/tests/posix/exec_nonexistent.sh
blob: b4e08e06b468d0e31b11c8f3191e49b2d9f22d34 (plain)
1
2
3
4
5
6
7
8
# 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

bfs_diff basic -print -exec "$TESTS/nonexistent" {} \; -print
(($? == EX_BFS))