summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-04-19 19:53:03 +0000
committerJim Meyering <jim@meyering.net>2002-04-19 19:53:03 +0000
commitad9fd82850e90fa2387956dc51bb3617015f5bb3 (patch)
tree8b9cd006c2894a666a8e2596e4525e875a6ce537 /tests
parentda5debc9958083332a1baa46117cb25b7751e7c0 (diff)
downloadcoreutils-ad9fd82850e90fa2387956dc51bb3617015f5bb3.tar.xz
Use `rm', not $RM. Use better trap.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rm/ir-113
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index 71418a305..19a875290 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -1,17 +1,16 @@
#!/bin/sh
-: ${RM=rm}
test=ir-1
if test "$VERBOSE" = yes; then
set -x
- $RM --version
+ rm --version
fi
-# Don't require use of TMPDIR.
-: ${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 $tmp/a $tmp/b $tmp/c || test_failure=1
@@ -42,7 +41,7 @@ EOF
# determine which one was removed based on order of dir entries.
# This is a good argument for switching to a dejagnu-style test suite.
fail=0
-$RM --verbose -i -r $tmp < $test.I > /dev/null 2>&1 || fail=1
+rm --verbose -i -r $tmp < $test.I > /dev/null 2>&1 || fail=1
# $tmp should not have been removed.
test -d $tmp || fail=1