diff options
author | Jim Meyering <jim@meyering.net> | 1997-08-24 19:18:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-08-24 19:18:03 +0000 |
commit | 6b099582bde5bd9fce3375bb2078d76bff2598e6 (patch) | |
tree | bd43c0522e32248521377245068918abe9c776fa /tests/rm/ir-1 | |
parent | fada8884a31fb72600fce8b8fc6e9c9efbd8d36b (diff) | |
download | coreutils-6b099582bde5bd9fce3375bb2078d76bff2598e6.tar.xz |
.
Diffstat (limited to 'tests/rm/ir-1')
-rwxr-xr-x | tests/rm/ir-1 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1 new file mode 100755 index 000000000..b14a6806b --- /dev/null +++ b/tests/rm/ir-1 @@ -0,0 +1,47 @@ +#!/bin/sh + +: ${RM=rm} +test=ir-1 + +if test "$VERBOSE" = yes; then + set -x + $RM --version +fi + +# Don't require use of TMPDIR. +: ${RM_TMPDIR=.} + +tmp=$RM_TMPDIR/t-rm.$$ + +test_failure=0 +mkdir $tmp || test_failure=1 +mkdir $tmp/a $tmp/a/a || test_failure=1 +mkdir $tmp/b $tmp/b/bb || test_failure=1 +mkdir $tmp/c $tmp/c/cc || test_failure=1 + +if $test_failure = 1; then + echo 'failure in testing framework' + exit 1 +fi + +fail=0 +$RM --verbose -r $tmp > $tmp/$test.O || fail=1 + +for d in $dirs; do + if test -d $d; then + 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 + +rm -rf $tmp + +exit $fail |