diff options
author | Jim Meyering <jim@meyering.net> | 1998-01-22 08:33:02 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-01-22 08:33:02 +0000 |
commit | f7bb262cc8c3cfc4312e80efd781e2c79a5cbd43 (patch) | |
tree | ab3f7b40126058ec32c4417154244d767581da22 | |
parent | d5494d57f574c968f9ced4d81148461bf00b5f01 (diff) | |
download | coreutils-f7bb262cc8c3cfc4312e80efd781e2c79a5cbd43.tar.xz |
minor tweaks
-rwxr-xr-x | tests/rm/ir-1 | 4 | ||||
-rwxr-xr-x | tests/rm/r-1 | 25 | ||||
-rwxr-xr-x | tests/rm/r-2 | 3 |
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 |