diff options
Diffstat (limited to 'tests/rm')
-rwxr-xr-x | tests/rm/r-3 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/rm/r-3 b/tests/rm/r-3 new file mode 100755 index 000000000..387115948 --- /dev/null +++ b/tests/rm/r-3 @@ -0,0 +1,37 @@ +#!/bin/sh + +: ${RM=rm} + +: ${TMPDIR=.} + +if test "$VERBOSE" = yes; then + $RM --version + set -x +fi + +tmp=$TMPDIR/t-rm.$$ + +framework_fail=0 +mkdir $tmp || framework_fail=1 + +a=1 +n=300 +i=$a +while :; do + touch $tmp/$i || framework_fail=1 + test `expr $i = $n` = 1 && break + i=`expr $i + 1` +done + +test -f $tmp/$a || framework_fail=1 +test -f $tmp/$n || framework_fail=1 + +if test $framework_fail = 1; then + echo 'failure in testing framework' + exit 1 +fi + +$RM -rf $tmp || fail=1 +test -d $tmp && fail=1 + +exit $fail |