summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-08-16 16:40:55 +0000
committerJim Meyering <jim@meyering.net>1997-08-16 16:40:55 +0000
commit754478c6f57a93a8aa27b392a881a37fddfcc05a (patch)
tree28e6818f12770c0236d933cec2f1d15ab61a9218 /tests
parentcaa34fb80610bb6da5839bf0903807d982b7cda5 (diff)
downloadcoreutils-754478c6f57a93a8aa27b392a881a37fddfcc05a.tar.xz
.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rm/r-237
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/rm/r-2 b/tests/rm/r-2
new file mode 100755
index 000000000..242a69692
--- /dev/null
+++ b/tests/rm/r-2
@@ -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