summaryrefslogtreecommitdiff
path: root/tests/rm/r-1
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-08-02 15:25:25 +0000
committerJim Meyering <jim@meyering.net>1997-08-02 15:25:25 +0000
commit9bb6fc54aad622e152cbc1a80cd17b32d69b01a0 (patch)
treec59b21942ae5cbe62b90eb2e308b8c374fe1f4e8 /tests/rm/r-1
parenteb1e691d009822690bc13c96e4a71dfec8cb0aae (diff)
downloadcoreutils-9bb6fc54aad622e152cbc1a80cd17b32d69b01a0.tar.xz
.
Diffstat (limited to 'tests/rm/r-1')
-rwxr-xr-xtests/rm/r-141
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/rm/r-1 b/tests/rm/r-1
new file mode 100755
index 000000000..d402ef0e0
--- /dev/null
+++ b/tests/rm/r-1
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+: ${RM=rm}
+test=r-1
+
+# TMPDIR should be an absolute dir for this test.
+# FIXME: enforce it
+: ${TMPDIR=/tmp}
+
+if test "$VERBOSE" = yes; then
+ set -x
+ $RM --version
+fi
+
+tmp=$TMPDIR/t-rm.$$
+mkdir $tmp
+
+mkdir $tmp/a $tmp/a/a
+touch $tmp/b
+
+fail=0
+$RM --verbose -r $tmp/a $tmp/b > $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
+
+ # FIXME: use cmp
+diff -u $tmp/$test.E $tmp/$test.O
+
+#rm -rf $dir
+
+exit $fail