Fix tests.sh to not forget some alternatives.
[nit.git] / tests / tests.sh
index ef4cc4f..1b45228 100755 (executable)
@@ -55,7 +55,7 @@ nok=""
 echo "<tr><td>$MARK</td>" >> $HTM
 
 for ii in "$@"; do
-    for alt in "" `sed -n 's/.*#\(alt[0-9]*\)#.*/\1/p' "$ii" | sort -u`; do
+    for alt in "" `sed -n 's/.*#!*\(alt[0-9]*\)#.*/\1/p' "$ii" | sort -u`; do
        f=`basename "$ii" .nit`
        d=`dirname "$ii"`
        ff="$f"
@@ -121,15 +121,19 @@ for ii in "$@"; do
        else
                echo "[=== no sav ===] $ff.res"
                echo -n "<a href=\"$ff.res\">res</a>" >> $HTM
+               nos="$nos $ff"
        fi
        echo "</td>" >> $HTM
    done
 done
 
-echo "ok: " `echo $ok | wc -w` "/ $#"
+echo "ok: " `echo $ok | wc -w` "/" `echo $ok $nok $nos | wc -w`
 echo "<td>" `echo $ok | wc -w` "</td><td>" `echo $nok | wc -w` "</td></tr>" >> $HTM
 
 if [ -n "$nok" ]; then
        echo "fail: $nok"
        echo "There were errors !"
 fi
+if [ -n "$nos" ]; then
+       echo "no sav: $nos"
+fi