summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-04-19 19:55:21 +0000
committerJim Meyering <jim@meyering.net>2002-04-19 19:55:21 +0000
commit3f094fd26b326ee08dcb09990880a79c1ffa8d45 (patch)
tree1f3fffe1126fae4e7ecd303470dd9fcb8c59c9f7 /tests/rm
parente86cf7f5e6ca2ebdec14a7ef5f7c7f1ad680096f (diff)
downloadcoreutils-3f094fd26b326ee08dcb09990880a79c1ffa8d45.tar.xz
Use `rm', not $RM. Use better trap.
Diffstat (limited to 'tests/rm')
-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