summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-04-19 21:59:57 +0000
committerJim Meyering <jim@meyering.net>2002-04-19 21:59:57 +0000
commit2b5e6e4835e074f6c1dcbe189035fa87dc32a5cb (patch)
tree0638b461008318c5d8a7e1dffb5f3cd26d510b39 /tests/rm
parent306c8e8b4fec79a581f2cad7b160ba6f61f600ac (diff)
downloadcoreutils-2b5e6e4835e074f6c1dcbe189035fa87dc32a5cb.tar.xz
clean-up
Diffstat (limited to 'tests/rm')
-rwxr-xr-xtests/rm/r-112
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index 53fce735f..53e3f4809 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -8,16 +8,12 @@ if test "$VERBOSE" = yes; then
fi
pwd=`pwd`
-
-# $tmp should be an absolute dir for this test.
-tmp=$pwd/`echo "$0"|sed 's,.*/,,'`.tmp
-
-trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
+trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
framework_failure=0
-
-mkdir $tmp || framework_failure=1
+mkdir -p $tmp || framework_failure=1
mkdir $tmp/a $tmp/a/a || framework_failure=1
> $tmp/b || framework_failure=1
@@ -47,6 +43,8 @@ done
# Compare expected and actual output.
cmp $tmp/$test.E $tmp/$test.O || fail=1
+test $fail = 1 && diff -u $tmp/$test.E $tmp/$test.O 2> /dev/null
+
rm -rf $tmp