summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-01-22 08:32:22 +0000
committerJim Meyering <jim@meyering.net>1998-01-22 08:32:22 +0000
commitd5494d57f574c968f9ced4d81148461bf00b5f01 (patch)
tree096da850a8d269566d94fafabb4fb905ecfdde93
parent14a2593daf085650f24ee570d708df9bf9fa6901 (diff)
downloadcoreutils-d5494d57f574c968f9ced4d81148461bf00b5f01.tar.xz
Don't use -f. Do adjust $RM if it's a relative path.
-rwxr-xr-xtests/rm/sunos-113
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1
index 241013e3b..0cb731114 100755
--- a/tests/rm/sunos-1
+++ b/tests/rm/sunos-1
@@ -1,6 +1,6 @@
#!/bin/sh
-# Make sure that rm -rf '' fails.
-# On SunOS 4.1.3, running rm -rf '' in a nonempty directory may
+# Make sure that rm -r '' fails.
+# On SunOS 4.1.3, running rm -r '' in a nonempty directory may
# actually remove files with names of entries in the current directory
# but relative to `/' rather than relative to the current directory.
@@ -14,6 +14,13 @@ fi
tmp=t-rm.$$
+# We're going to run RM from a subdir.
+# Prepend ../ if $RM is a relative file name.
+case $RM in
+ /*) ;;
+ */*) RM=../$RM
+esac
+
test_failure=0
mkdir $tmp || test_failure=1
@@ -24,7 +31,7 @@ fi
fail=0
cd $tmp
-$RM -rf '' > /dev/null 2>&1 && fail=1
+$RM -r '' > /dev/null 2>&1 && fail=1
cd ..
rm -rf $tmp