summaryrefslogtreecommitdiff
path: root/tests/rm/dangling-symlink
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-07-19 21:12:23 +0000
committerJim Meyering <jim@meyering.net>2002-07-19 21:12:23 +0000
commit29c8739e953eed973abbb68464554454dfeca4be (patch)
treeb002464511e4b5253a6c4f546d80e8b8fd323ba8 /tests/rm/dangling-symlink
parent767a8b968e4e8fea54f25dbf5b8f95fb0bc997f6 (diff)
downloadcoreutils-29c8739e953eed973abbb68464554454dfeca4be.tar.xz
Use input-tty rather than testing for /dev/stdin.
Diffstat (limited to 'tests/rm/dangling-symlink')
-rwxr-xr-xtests/rm/dangling-symlink9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index 97cafcaa7..73cd889c7 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -7,6 +7,9 @@ if test "$VERBOSE" = yes; then
rm --version
fi
+# Make sure there's a tty on stdin.
+. $srcdir/../input-tty
+
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
@@ -24,11 +27,7 @@ fi
fail=0
-# Skip this test if there is no /dev/stdin file.
-ls /dev/stdin >/dev/null 2>&1 \
- || { (exit 77); exit; }
-
-rm dangle < /dev/stdin &
+rm dangle &
pid=$!
# The buggy rm (fileutils-4.1.9) would hang here, waiting for input.