summaryrefslogtreecommitdiff
path: root/tests/misc/close-stdout.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/close-stdout.sh')
-rwxr-xr-xtests/misc/close-stdout.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/misc/close-stdout.sh b/tests/misc/close-stdout.sh
index 4da696c4..6714ec0f 100755
--- a/tests/misc/close-stdout.sh
+++ b/tests/misc/close-stdout.sh
@@ -2,7 +2,7 @@
# Ensure that several programs work fine, even with stdout initially closed.
# This is effectively a test of closeout.c's close_stdout function.
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,21 +44,21 @@ sleep 0 >&- || fail=1
# This test is ineffective unless /dev/stdout also works.
if "$p/src/test" -w /dev/stdout >/dev/null &&
"$p/src/test" ! -w /dev/stdout >&-; then
- "$p/src/printf" 'foo' >&- 2>/dev/null && fail=1
- cp --verbose a b >&- 2>/dev/null && fail=1
+ returns_ 1 "$p/src/printf" 'foo' >&- 2>/dev/null || fail=1
+ returns_ 1 cp --verbose a b >&- 2>/dev/null || fail=1
rm -Rf tmpfile-?????? || fail=1
- mktemp tmpfile-XXXXXX >&- 2>/dev/null && fail=1
- mktemp tmpfile-XXXXXX -q >&- 2>/dev/null && fail=1
+ returns_ 1 mktemp tmpfile-XXXXXX >&- 2>/dev/null || fail=1
+ returns_ 1 mktemp tmpfile-XXXXXX -q >&- 2>/dev/null || fail=1
case $(echo tmpfile-??????) in 'tmpfile-??????') ;; *) fail=1 ;; esac
fi
# Likewise for /dev/full, if /dev/full works.
if test -w /dev/full && test -c /dev/full; then
- "$p/src/printf" 'foo' >/dev/full 2>/dev/null && fail=1
- cp --verbose a b >/dev/full 2>/dev/null && fail=1
+ returns_ 1 "$p/src/printf" 'foo' >/dev/full 2>/dev/null || fail=1
+ returns_ 1 cp --verbose a b >/dev/full 2>/dev/null || fail=1
rm -Rf tmpdir-?????? || fail=1
- mktemp -d tmpdir-XXXXXX >/dev/full 2>/dev/null && fail=1
- mktemp -d -q tmpdir-XXXXXX >/dev/full 2>/dev/null && fail=1
+ returns_ 1 mktemp -d tmpdir-XXXXXX >/dev/full 2>/dev/null || fail=1
+ returns_ 1 mktemp -d -q tmpdir-XXXXXX >/dev/full 2>/dev/null || fail=1
case $(echo tmpfile-??????) in 'tmpfile-??????') ;; *) fail=1 ;; esac
fi