From 2b5e6e4835e074f6c1dcbe189035fa87dc32a5cb Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 19 Apr 2002 21:59:57 +0000 Subject: clean-up --- tests/rm/r-1 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tests/rm') 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 -- cgit v1.2.3-70-g09d2