logo

utils-std

Collection of commonly available Unix tools
commit: 24adb9d1751957d87398a7a3dfa7b225aa9c66a4
parent 22434f313fe9642c33a9d472a85396a87e5a74a2
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 13 Jun 2024 19:32:53 +0200

test-cmd/env: Restore exit code tests

Diffstat:

Mtest-cmd/env.sh8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test-cmd/env.sh b/test-cmd/env.sh @@ -12,7 +12,7 @@ then fi target="$(dirname "$0")/../cmd/env" -plans=6 +plans=8 . "$(dirname "$0")/tap.sh" t reset '-i FOO=BAR' 'FOO=BAR @@ -26,8 +26,8 @@ t unsetflag "-i FOOZ=BARZ $target --unset=FOOZ FOO=BAR" 'FOO=BAR t exec_true 'true' '' t exec_echo 'echo' ' ' +t --exit=1 exec_false 'false' '' +t --exit=127 enoent '/var/empty/e/no/ent' 'env: execvp("/var/empty/e/no/ent", ...): No such file or directory +' # atf_check -s not-exit:0 -e "inline:env: Error: Unrecognised option: '-f'\nenv [-i] [-u key | --unset=key] [key=value ...] [command [args]]\n" ../cmd/env -f -# atf_check -s exit:127 -e 'inline:env: execvp("/var/empty/e/no/ent", ...): No such file or directory\n' ../cmd/env /var/empty/e/no/ent - -# atf_check -s exit:1 ../cmd/env false