summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/close-stdout6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout
index fec1addc8..852c3c822 100755
--- a/tests/misc/close-stdout
+++ b/tests/misc/close-stdout
@@ -50,12 +50,18 @@ 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
+ rm -Rf tmpfile-?????? || fail=1
+ mktemp tmpfile-XXXXXX >&- 2>/dev/null && fail=1
+ test -e tmpfile-?????? && fail=1
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
+ rm -Rf tmpdir-?????? || fail=1
+ mktemp -d tmpdir-XXXXXX >/dev/full 2>/dev/null && fail=1
+ test -e tmpdir-?????? && fail=1
fi
Exit $fail