summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/rm/f-112
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/rm/f-1 b/tests/rm/f-1
index 495bca88e..da79b7229 100755
--- a/tests/rm/f-1
+++ b/tests/rm/f-1
@@ -1,15 +1,16 @@
#!/bin/sh
-: ${RM=rm}
test=f-1
if test "$VERBOSE" = yes; then
set -x
- $RM --version
+ rm --version
fi
-: ${RM_TMPDIR=.}
-tmp=$RM_TMPDIR/t-rm.$$
+pwd=`pwd`
+tmp=`echo "$0"|sed 's,.*/,,'`.tmp
+trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
+trap '(exit $?); exit' 1 2 13 15
test_failure=0
mkdir $tmp || test_failure=1
@@ -20,7 +21,6 @@ if test $test_failure = 1; then
fi
fail=0
-$RM -f $tmp/no-such-file || fail=1
-rm -rf $tmp
+rm -f $tmp/no-such-file || fail=1
exit $fail