test_failure=0
mkdir $tmp $tmp/a $tmp/b $tmp/c || test_failure=1
-touch $tmp/a/a $tmp/b/bb $tmp/c/cc || test_failure=1
+> $tmp/a/a || test_failure=1
+> $tmp/b/bb || test_failure=1
+> $tmp/c/cc || test_failure=1
if test $test_failure = 1; then
echo 'failure in testing framework'
fi
tmp=$TMPDIR/t-rm.$$
-mkdir $tmp
-mkdir $tmp/a $tmp/a/a
-touch $tmp/b
+test_failure=0
+
+mkdir $tmp || test_failure=1
+mkdir $tmp/a $tmp/a/a || test_failure=1
+> $tmp/b || test_failure=1
+
+cat <<EOF > $tmp/$test.E || test_failure=1
+$tmp/a
+$tmp/a/a
+$tmp/b
+EOF
+
+if test $test_failure = 1; then
+ echo 'failure in testing framework'
+ exit 1
+fi
fail=0
$RM --verbose -r $tmp/a $tmp/b > $tmp/$test.O || fail=1
fi
done
-cat <<EOF > $tmp/$test.E
-$tmp/a
-$tmp/a/a
-$tmp/b
-EOF
-
# Compare expected and actual output.
cmp $tmp/$test.E $tmp/$test.O || fail=1
tmp=$TMPDIR/t-rm.$$
mkdir $tmp $tmp/a $tmp/a/b
-touch $tmp/a/f $tmp/a/b/g
+> $tmp/a/f
+> $tmp/a/b/g
fail=0
$RM --verbose -r $tmp/a > $tmp/$test.O || fail=1