summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rm')
-rwxr-xr-xtests/rm/ir-14
-rwxr-xr-xtests/rm/r-125
-rwxr-xr-xtests/rm/r-23
3 files changed, 21 insertions, 11 deletions
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index 9c54a9736..71418a305 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -15,7 +15,9 @@ tmp=$RM_TMPDIR/t-rm.$$
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'
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index afd21e2f8..cc58feb5c 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -13,10 +13,23 @@ if test "$VERBOSE" = yes; then
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
@@ -27,12 +40,6 @@ for d in $dirs; do
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
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 5c82c9074..5c284d0b1 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -13,7 +13,8 @@ fi
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