mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-30 13:33:59 +08:00
.
This commit is contained in:
parent
caa34fb806
commit
754478c6f5
37
tests/rm/r-2
Executable file
37
tests/rm/r-2
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
: ${RM=rm}
|
||||
test=r-2
|
||||
|
||||
: ${TMPDIR=.}
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
$RM --version
|
||||
set -x
|
||||
fi
|
||||
|
||||
tmp=$TMPDIR/t-rm.$$
|
||||
|
||||
mkdir $tmp $tmp/a $tmp/a/b
|
||||
touch $tmp/a/f $tmp/a/b/g
|
||||
|
||||
fail=0
|
||||
$RM --verbose -r $tmp/a > $tmp/$test.O || fail=1
|
||||
|
||||
if test -d $tmp/a; then
|
||||
fail=1
|
||||
fi
|
||||
|
||||
cat <<EOF > $tmp/$test.E
|
||||
$tmp/a
|
||||
$tmp/a/b
|
||||
$tmp/a/b/g
|
||||
$tmp/a/f
|
||||
EOF
|
||||
|
||||
# Compare expected and actual output.
|
||||
cmp $tmp/$test.E $tmp/$test.O || fail=1
|
||||
|
||||
rm -rf $dir
|
||||
|
||||
exit $fail
|
Loading…
Reference in New Issue
Block a user