diff options
author | Mark Whitley | 2001-05-24 17:15:33 +0000 |
---|---|---|
committer | Mark Whitley | 2001-05-24 17:15:33 +0000 |
commit | 04052f96e1385405787356f0955afadd73d8f029 (patch) | |
tree | 1a95bdf6e1e21bb031b872d032ba2ca0d0664757 /tests/tester.sh | |
parent | a813afc24f864e0055bdd0ef8cde6777a514b212 (diff) | |
download | busybox-04052f96e1385405787356f0955afadd73d8f029.zip busybox-04052f96e1385405787356f0955afadd73d8f029.tar.gz |
Numerous new testcases from Larry Doolittle and a patch to tester.sh to avoid
a bash2-ism and quote variables that contain strings.
Diffstat (limited to 'tests/tester.sh')
-rwxr-xr-x | tests/tester.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/tester.sh b/tests/tester.sh index a4fa38d..9209006 100755 --- a/tests/tester.sh +++ b/tests/tester.sh @@ -87,7 +87,7 @@ unalias -a # gets rid of aliases that might create different output # do extra setup (if any) -if [ ! -z $SETUP ] +if [ ! -z "$SETUP" ] then [ $DEBUG -ge 2 ] && echo "running setup commands in $SETUP" source $SETUP @@ -120,8 +120,12 @@ do # change line to include "busybox" before every statement line="$BUSYBOX $line" - line=${line//;/; $BUSYBOX } - line=${line//|/| $BUSYBOX } + # is this a bash-2-ism? + # line=${line//;/; $BUSYBOX } + # line=${line//|/| $BUSYBOX } + # assume $BUSYBOX has no commas + line=`echo $line | sed -e 's,;,; '$BUSYBOX, \ + -e 's,|,| '$BUSYBOX,` # execute line using busybox programs [ $DEBUG -ge 2 ] && echo "testing: $line" | tee -a $LOGFILE @@ -143,11 +147,11 @@ done # do normal cleanup -[ $KEEPTMPFILES == "no" ] && rm -f $BB_OUT $GNU_OUT +[ "$KEEPTMPFILES" = "no" ] && rm -f $BB_OUT $GNU_OUT # do extra cleanup (if any) -if [ ! -z $CLEANUP ] +if [ ! -z "$CLEANUP" ] then [ $DEBUG -ge 2 ] && echo "running cleanup commands in $CLEANUP" source $CLEANUP |