mirror of
https://github.com/coreutils/coreutils.git
synced 2024-11-27 12:04:25 +08:00
.
This commit is contained in:
parent
94c7a45d8e
commit
70611589b3
39
tests/rm/deep-1
Executable file
39
tests/rm/deep-1
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is a bit of a torture test for mkdir -p, too.
|
||||
|
||||
: ${RM=rm}
|
||||
: ${MKDIR=mkdir}
|
||||
|
||||
test=deep-1
|
||||
|
||||
: ${TMPDIR=.}
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
$RM --version
|
||||
fi
|
||||
|
||||
umask 022
|
||||
|
||||
fail=0
|
||||
|
||||
tmp=$TMPDIR/t-rm.$$
|
||||
|
||||
k20=/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k/k
|
||||
k200=$k20$k20$k20$k20$k20$k20$k20$k20$k20$k20
|
||||
k400=$k200$k200
|
||||
|
||||
# Create a directory in $tmp with 400 `k' components.
|
||||
deep=$tmp/$k400
|
||||
$MKDIR -p $deep || fail=1
|
||||
|
||||
# Make sure the deep dir was created.
|
||||
test -d $deep || fail=1
|
||||
|
||||
$RM -r $tmp > $tmp/$test.O || fail=1
|
||||
|
||||
# Make sure it was deleted.
|
||||
test -d $deep && fail=1
|
||||
|
||||
exit $fail
|
Loading…
Reference in New Issue
Block a user