-# Simple test harness infrastructurei for BusyBox
+# Simple test harness infrastructure for BusyBox
#
# Copyright 2005 by Rob Landley
#
# number of failed tests.
# The "optional" function is used to skip certain tests, ala:
-# optional CONFIG_FEATURE_THINGY
+# optional FEATURE_THINGY
#
# The "optional" function checks the environment variable "OPTIONFLAGS",
# which is either empty (in which case it always clears SKIP) or
{
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
}
$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=$?