From: erg Date: Mon, 29 Oct 2007 22:08:52 +0000 (+0000) Subject: Add check that a test has a base file for comparison and report if not; X-Git-Tag: LAST_LIBGRAPH~32^2~5119 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=946419cfd71223505e44904186229633a1ce3542;p=graphviz Add check that a test has a base file for comparison and report if not; clear out the indices as well as the values used in TESTTYPE --- diff --git a/rtest/rtest.sh b/rtest/rtest.sh index e4f83f65d..27b753bd7 100755 --- a/rtest/rtest.sh +++ b/rtest/rtest.sh @@ -186,6 +186,16 @@ function genOutname OUTFILE="$1_$2$XFMT$J.$F" } +# clear out all entries of associated array +function aunset #name +{ + typeset i + nameref v=$1 + for i in ${!v[@]} + do unset v[$i] + done +} + function doTest { if (( SUBTESTCNT == 0 )) @@ -231,16 +241,20 @@ function doTest elif [[ $GENERATE == 1 ]] then continue - else + elif [[ -r $REFDIR/$OUTFILE ]] + then doDiff $TESTNAME $i ${FMT[$i]} + else + print -u 2 "Test $TESTNAME:$i : == No file $REFDIR/$OUTFILE for comparison ==" fi done # clear TESTTYPES - for W in ${!TESTTYPES[@]} - do - TESTTYPES[$W]=0 - done + aunset TESTTYPES +# for W in ${!TESTTYPES[@]} +# do +# TESTTYPES[$W]=0 +# done } trap 'rm -f $TMPFILE $TMPINFILE errout; exit' 0 1 2 3 15