]> granicus.if.org Git - graphviz/commitdiff
Add check that a test has a base file for comparison and report if not;
authorerg <devnull@localhost>
Mon, 29 Oct 2007 22:08:52 +0000 (22:08 +0000)
committererg <devnull@localhost>
Mon, 29 Oct 2007 22:08:52 +0000 (22:08 +0000)
clear out the indices as well as the values used in TESTTYPE

rtest/rtest.sh

index e4f83f65d2d4973e97a82720801431a1a32e42fc..27b753bd75f89b2e60f4b969645f8429fa4d719a 100755 (executable)
@@ -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