From d7232f8ca7fec756ad32cce7d771d41f4bede42f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 30 Sep 2000 08:32:55 +0000 Subject: Update to use newer template. --- tests/du/two-args | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/du/two-args b/tests/du/two-args index 6de6d0fe8..27c78968e 100755 --- a/tests/du/two-args +++ b/tests/du/two-args @@ -7,9 +7,19 @@ if test "$VERBOSE" = yes; then du --version fi +pwd=`pwd` tmp=du2-$$ -trap 'status=$?; rm -rf $tmp && exit $status' 0 -trap 'exit $?' 1 2 13 15 +trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap '(exit $?); exit' 1 2 13 15 + +framework_failure=0 +mkdir $tmp || framework_failure=1 +cd $tmp || framework_failure=1 + +if test $framework_failure = 1; then + echo 'failure in testing framework' + (exit 1); exit +fi mkdir -p $tmp/1 $tmp/2 @@ -21,4 +31,4 @@ du $tmp/1 $tmp/2 > /dev/null || fail=1 du . $tmp > /dev/null || fail=1 du .. $tmp > /dev/null || fail=1 -exit $fail +(exit $fail); exit -- cgit v1.2.3-70-g09d2