changeset 291:620a2eab6b82

More tweaks to rmdir.test and the testing infrastructure.
author Rob Landley <rob@landley.net>
date Sun, 04 May 2008 19:44:39 -0500
parents d37e2de3a9f3
children b4077be6c746
files scripts/test.sh scripts/test/rmdir.test
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/test.sh	Sun May 04 18:59:16 2008 -0500
+++ b/scripts/test.sh	Sun May 04 19:44:39 2008 -0500
@@ -5,7 +5,7 @@
 rm -rf testdir
 mkdir -p testdir
 
-if [ -z "$OLD" ]
+if [ -z "$TEST_HOST" ]
 then
   make install_flat PREFIX=testdir || exit 1
 fi
@@ -26,7 +26,7 @@
   for i in "$TOPDIR"/scripts/test/*.test
   do
     CMDNAME="$(echo "$i" | sed 's@.*/\(.*\)\.test@\1@')"
-    if [ -h $CMDNAME ]
+    if [ -h $CMDNAME ] || [ ! -z "$TEST_HOST" ]
     then
       . $i
     else
--- a/scripts/test/rmdir.test	Sun May 04 18:59:16 2008 -0500
+++ b/scripts/test/rmdir.test	Sun May 04 19:44:39 2008 -0500
@@ -5,7 +5,7 @@
 #testing "name" "command" "result" "infile" "stdin"
 
 mkdir one
-testing "rmdir" "rmdir one && [ ! -d walrus ] && echo yes" "yes\n" "" ""
+testing "rmdir" "rmdir one && [ ! -d one ] && echo yes" "yes\n" "" ""
 
 touch walrus
 testing "rmdir file" \
@@ -20,6 +20,7 @@
 testing "rmdir one missing two file three" \
 	"rmdir one missing two walrus three 2> /dev/null || [ ! -d three ] && echo yes" \
 	"yes\n" "" ""
+rm walrus
 
 mkdir one
 chmod 000 one
@@ -39,7 +40,12 @@
 	"yes\n" "" ""
 rm -rf temp
 
+
 mkdir -p one/two/three
 testing "rmdir -p one/two/three" \
 	"rmdir -p one/two/three && [ ! -e one ] && echo yes" "yes\n" "" ""
-rm walrus
+
+#mkdir -p one/two/three
+#chmod 000 one/two/three one/two one
+#testing "rmdir -p one/two/three" \
+#	"rmdir -p one/two/three && [ ! -e one ] && echo yes" "yes\n" "" ""