From 04052f96e1385405787356f0955afadd73d8f029 Mon Sep 17 00:00:00 2001 From: Mark Whitley Date: Thu, 24 May 2001 17:15:33 +0000 Subject: Numerous new testcases from Larry Doolittle and a patch to tester.sh to avoid a bash2-ism and quote variables that contain strings. --- tests/tester.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/tester.sh') diff --git a/tests/tester.sh b/tests/tester.sh index a4fa38d34..92090068d 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 -- cgit v1.2.3