]> git.draconx.ca Git - liblbx.git/blobdiff - tests/empty-image.tap
tests: First stab at a proper test suite.
[liblbx.git] / tests / empty-image.tap
diff --git a/tests/empty-image.tap b/tests/empty-image.tap
new file mode 100755 (executable)
index 0000000..0ef378b
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# 2ooM: The Master of Orion II Reverse Engineering Project
+# Test decoding of empty (0x0) images
+# Copyright © 2013 Nick Bowler
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+. "$srcdir/tests/util/test-init.sh" || exit 99
+
+plan_ 2
+dx_create_testdir
+
+command_ok_ "decoding image-0x0" -D TODO \
+       $LBXIMG -F pbm -dnf "$testdata/image-0x0"
+
+check_output() {
+       diff out.000.pbm - 1>&2 <<'EOF'
+P1
+0 0
+EOF
+}
+command_ok_ "empty (0x0) image output" check_output