]> git.draconx.ca Git - liblbx.git/commitdiff
Add another test to the regression test.
authorNick Bowler <draconx@gmail.com>
Mon, 7 Jan 2008 03:10:00 +0000 (22:10 -0500)
committerNick Bowler <draconx@gmail.com>
Mon, 7 Jan 2008 03:10:00 +0000 (22:10 -0500)
tests/regress.sh

index 5d893e58c860fd34f8fe817e4bef44eef336c7c3..07867cef8f276c8be44f0f4b2396c9af17629e68 100755 (executable)
@@ -10,7 +10,7 @@ LBXTOOL="`readlink -f ../src/lbxtool`"
 LBXIMG="`readlink -f ../src/lbximg`"
 
 # Status vars
-FAILED=""
+FAILED=0
 
 if ! SCRATCH="`mktemp -d`"; then
        exit 1
@@ -32,7 +32,7 @@ compare()
                rm -f "$FILE"
        else
                echo "FAILED"
-               FAILED="yes"
+               FAILED=`expr $FAILED + 1`
        fi
 }
 
@@ -56,7 +56,7 @@ compare 49 390c49cfd1fe5e2ac0490be976f20936
 # Logos
 $LBXTOOL -xf $DATADIR/logo.lbx 
 
-echo "logo.lbx.000: single frame, embedded palette:"
+echo "logo.lbx.000: single frame, embedded palette, transparency:"
 $LBXIMG -df logo.lbx.000
 compare 0 5cc8d2b761390d15be2738030c658bfc
 
@@ -66,5 +66,17 @@ compare  0 f3f0859b39f2e76091842c8a7276b2a1
 compare 30 8fb41356a20c68c3be0939ad49256cf9
 compare 63 156f381c5d4bf6178affd3d6a4720118
 
+# Ships
+$LBXTOOL -xf $DATADIR/ships.lbx ships.lbx.{042,049}
+
+echo "ships.lbx.042: single frame, external+override palette, transparency:"
+$LBXIMG -df ships.lbx.042 -p fonts.lbx.012 -O ships.lbx.049
+compare 0 bd643736d46ef387bcffcc8803aabb83
+
 # Clean up
-[ -z "$FAILED" ] && rm -rf -- "$SCRATCH"
+if [ $FAILED -eq 0 ]; then
+       echo "All tests completed successfully."
+       rm -rf -- "$SCRATCH"
+else
+       echo "$FAILED test(s) FAILED"
+fi