summaryrefslogtreecommitdiff
path: root/tests/rm/r-1
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-01-22 08:33:02 +0000
committerJim Meyering <jim@meyering.net>1998-01-22 08:33:02 +0000
commitf7bb262cc8c3cfc4312e80efd781e2c79a5cbd43 (patch)
treeab3f7b40126058ec32c4417154244d767581da22 /tests/rm/r-1
parentd5494d57f574c968f9ced4d81148461bf00b5f01 (diff)
downloadcoreutils-f7bb262cc8c3cfc4312e80efd781e2c79a5cbd43.tar.xz
minor tweaks
Diffstat (limited to 'tests/rm/r-1')
-rwxr-xr-xtests/rm/r-125
1 files changed, 16 insertions, 9 deletions
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