diff options
author | Jim Meyering <meyering@fb.com> | 2016-11-08 19:57:41 -0600 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2016-11-13 08:26:19 -0800 |
commit | 22063c8c083d2d8130efb76482e45fa1976a595a (patch) | |
tree | 18645c547557304f18702e3c07b83fb3793ea135 /tests/misc/nice-fail.sh | |
parent | 4d45722d1160a04e4d26fd812da4e0140ad3550c (diff) | |
download | coreutils-22063c8c083d2d8130efb76482e45fa1976a595a.tar.xz |
tests: use "returns_" rather than explicit comparison with "$?"
* tests/chmod/no-x.sh: Likewise.
* tests/cp/no-deref-link1.sh: Likewise.
* tests/cp/no-deref-link2.sh: Likewise.
* tests/cp/no-deref-link3.sh: Likewise.
* tests/du/move-dir-while-traversing.sh: Likewise.
* tests/ls/infloop.sh: Likewise.
* tests/ls/stat-failed.sh: Likewise.
* tests/ls/time-style-diag.sh: Likewise.
* tests/misc/chroot-fail.sh: Likewise.
* tests/misc/env-null.sh: Likewise.
* tests/misc/env.sh: Likewise.
* tests/misc/nice-fail.sh: Likewise.
* tests/misc/printenv.sh: Likewise.
* tests/misc/timeout.sh: Likewise.
* tests/tail-2/follow-name.sh: Likewise.
Diffstat (limited to 'tests/misc/nice-fail.sh')
-rwxr-xr-x | tests/misc/nice-fail.sh | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/misc/nice-fail.sh b/tests/misc/nice-fail.sh index 92d00be50..86e9d6fd0 100755 --- a/tests/misc/nice-fail.sh +++ b/tests/misc/nice-fail.sh @@ -22,17 +22,11 @@ print_ver_ nice # These tests verify exact status of internal failure. -nice -n 1 # missing command -test $? = 125 || fail=1 -nice --- # unknown option -test $? = 125 || fail=1 -nice -n 1a # invalid adjustment -test $? = 125 || fail=1 -nice sh -c 'exit 2' # exit status propagation -test $? = 2 || fail=2 -nice . # invalid command -test $? = 126 || fail=1 -nice no_such # no such command -test $? = 127 || fail=1 +returns_ 125 nice -n 1 || fail=1 # missing command +returns_ 125 nice --- || fail=1 # unknown option +returns_ 125 nice -n 1a || fail=1 # invalid adjustment +returns_ 2 nice sh -c 'exit 2' || fail=1 # exit status propagation +returns_ 126 nice . || fail=1 # invalid command +returns_ 127 nice no_such || fail=1 # no such command Exit $fail |