X-Git-Url: http://nitlanguage.org diff --git a/tests/tests.sh b/tests/tests.sh index 6483969..c89adf7 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -44,7 +44,6 @@ Usage: $e [options] modulenames -h This help --engine Use a specific engine (default=nitg) --noskip Do not skip a test even if the .skip file matches ---[no]soso Force enable (or disable) SOSO END } @@ -60,16 +59,16 @@ function compare_to_result() local pattern="$1" local sav="$2" if [ ! -r "$sav" ]; then return 0; fi + test "`cat "$sav"`" = "UNDEFINED" && return 1 diff -u "$sav" "out/$pattern.res" > "out/$pattern.diff.sav.log" if [ "$?" == 0 ]; then return 1 fi - [ -z "$soso" ] && return 3 sed '/[Ww]arning/d;/[Ee]rror/d' "out/$pattern.res" > "out/$pattern.res2" sed '/[Ww]arning/d;/[Ee]rror/d' "$sav" > "out/$pattern.sav2" grep '[Ee]rror' "out/$pattern.res" >/dev/null && echo "Error" >> "out/$pattern.res2" grep '[Ee]rror' "$sav" >/dev/null && echo "Error" >> "out/$pattern.sav2" - diff -u "out/$pattern.sav2" "out/$pattern.res2" > "out/$pattern.diff.sav.log" + diff -u "out/$pattern.sav2" "out/$pattern.res2" > "out/$pattern.diff.sav.log2" if [ "$?" == 0 ]; then return 2 else @@ -109,7 +108,10 @@ function process_result() LIST="$LIST $sav" ;; 2) - SOSOF="$sav" + if [ -z "$FIRST" ]; then + SOSOF="$sav" + FIRST="$sav" + fi LIST="$LIST $sav" ;; 3) @@ -132,7 +134,10 @@ function process_result() LIST="$LIST $sav" ;; 2) - SOSO="$sav" + if [ -z "$FIRST" ]; then + SOSO="$sav" + FIRST="$sav" + fi LIST="$LIST $sav" ;; 3) @@ -166,17 +171,26 @@ function process_result() echo >>$xml "" fi todos="$todos $pattern" - elif [ -n "$SOSO" ]; then - echo "[soso] out/$pattern.res $SOSO" - ok="$ok $pattern" elif [ "x$NYI" = "x0" ]; then echo "[todo] out/$pattern.res -> not yet implemented" echo >>$xml "" todos="$todos $pattern" + elif [ -n "$SOSO" ]; then + echo "[======= soso out/$pattern.res $SOSO =======]" + echo >>$xml "" + echo >>$xml ">$xml -n 50 + echo >>$xml "]]>" + nok="$nok $pattern" + echo "$ii" >> "$ERRLIST" elif [ -n "$SOSOF" ]; then - echo "[fixme soso] out/$pattern.res $SOSOF" - echo >>$xml "" - todos="$todos $pattern" + echo "[======= fixme soso out/$pattern.res $SOSOF =======]" + echo >>$xml "" + echo >>$xml ">$xml -n 50 + echo >>$xml "]]>" + nok="$nok $pattern" + echo "$ii" >> "$ERRLIST" elif [ -n "$NSAV" ]; then echo "[======= fail out/$pattern.res $NSAV =======]" echo >>$xml "" @@ -272,8 +286,6 @@ while [ $stop = false ]; do -h) usage; exit;; --engine) engine="$2"; shift; shift;; --noskip) noskip=true; shift;; - --soso) soso=true; shift;; - --nososo) nososo=true; shift;; *) stop=true esac done