summaryrefslogtreecommitdiff
path: root/tests/misc/nohup.sh
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-05-06 02:37:43 +0100
committerPádraig Brady <P@draigBrady.com>2014-05-07 00:06:00 +0100
commit8840a00cd79b8beae72b1a0ec6b9e64912633c13 (patch)
tree32cba40c4c2d88a8cf75c7721742e367bd9a0398 /tests/misc/nohup.sh
parent0b04ff22edcd7b75f0929f5bede7d814d100e2f1 (diff)
downloadcoreutils-8840a00cd79b8beae72b1a0ec6b9e64912633c13.tar.xz
tests: improve diagnostics when asserting empty files
* tests/chmod/c-option.sh: Use `compare /dev/null ... || fail=1` rather than `test -s ... && fail=1`, so that the file contents are output, thus improving diagnostics for failing tests. * tests/cp/acl.sh: Likewise. * tests/cp/cp-a-selinux.sh: Likewise. * tests/cp/cp-mv-enotsup-xattr.sh: Likewise. * tests/cp/reflink-perm.sh: Likewise. * tests/dd/misc.sh: Likewise. * tests/misc/env-null.sh: Likewise. * tests/misc/env.sh: Likewise. * tests/misc/nice.sh: Likewise. * tests/misc/nohup.sh: Likewise. * tests/misc/printenv.sh: Likewise. * tests/misc/xattr.sh: Likewise. * tests/mv/update.sh: Likewise. * tests/rm/deep-2.sh: Likewise. * tests/rm/read-only.sh: Likewise. * tests/split/r-chunk.sh: Likewise. * tests/tail-2/follow-stdin.sh: Likewise. * tests/tail-2/inotify-race.sh: Likewise. * tests/tail-2/wait.sh: Likewise. * tests/touch/no-dereference.sh: Likewise. * cfg.mk (sc_prohibit_test_empty:): New syntax-check. * tests/cp/proc-zero-len.sh: Adjust to avoid false syntax-check failure. * tests/cp/proc-zero-len.sh: Likewise. * tests/mv/part-symlink.sh: Likewise. * tests/tail-2/infloop-1.sh: Likewise.
Diffstat (limited to 'tests/misc/nohup.sh')
-rwxr-xr-xtests/misc/nohup.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/misc/nohup.sh b/tests/misc/nohup.sh
index 2328b43e2..b3f4274ce 100755
--- a/tests/misc/nohup.sh
+++ b/tests/misc/nohup.sh
@@ -73,7 +73,7 @@ if test -w /dev/full && test -c /dev/full; then
nohup echo hi 2> /dev/full
test $? = 125 || fail=1
test -f nohup.out || fail=1
- test -s nohup.out && fail=1
+ compare /dev/null nohup.out || fail=1
rm -f nohup.out
exit $fail
) || fail=1
@@ -86,7 +86,7 @@ if test -t 1; then
# It must exist.
test -f nohup.out || fail=1
# It must be empty.
- test -s nohup.out && fail=1
+ compare /dev/null nohup.out || fail=1
fi
cat <<\EOF > exp || fail=1
@@ -106,7 +106,7 @@ if test -t 1; then
# It must exist.
test -f nohup.out || fail=1
# It must be empty.
- test -s nohup.out && fail=1
+ compare /dev/null nohup.out || fail=1
fi
cat <<\EOF > exp || fail=1