hush: HUSH_READONLY depends on HUSH
[oweals/busybox.git] / testsuite / testing.sh
index f907deade19932950cfc387b5617b2ea83a0ad56..f5b75694775f5ddf8be8742d820d2a399936b526 100644 (file)
@@ -1,4 +1,4 @@
-# Simple test harness infrastructurei for BusyBox
+# Simple test harness infrastructure for BusyBox
 #
 # Copyright 2005 by Rob Landley
 #
@@ -56,10 +56,10 @@ optional()
 {
        SKIP=
        while test "$1"; do
-               if test x"${OPTIONFLAGS/*:$1:*/y}" != x"y"; then
-                       SKIP=1
-                       return
-               fi
+               case "${OPTIONFLAGS}" in
+                       *:$1:*) ;;
+                       *) SKIP=1; return ;;
+               esac
                shift
        done
 }
@@ -87,6 +87,8 @@ testing()
 
   $ECHO -ne "$3" > expected
   $ECHO -ne "$4" > input
+  [ -z "$VERBOSE" ] || echo ======================
+  [ -z "$VERBOSE" ] || echo "echo -ne '$4' >input"
   [ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2"
   $ECHO -ne "$5" | eval "$2" > actual
   RETVAL=$?