tests: teach a res file to contains `UNDEFINED` and always match
authorJean Privat <jean@pryen.org>
Wed, 18 Jun 2014 15:05:30 +0000 (11:05 -0400)
committerJean Privat <jean@pryen.org>
Wed, 18 Jun 2014 19:02:40 +0000 (15:02 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/tests.sh

index 1c42a68..c89adf7 100755 (executable)
@@ -59,6 +59,7 @@ 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