about summary refs log tree commit diff
path: root/test/jbig-roundtrip.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/jbig-roundtrip.test')
-rwxr-xr-xtest/jbig-roundtrip.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/jbig-roundtrip.test b/test/jbig-roundtrip.test
new file mode 100755
index 00000000..766148c6
--- /dev/null
+++ b/test/jbig-roundtrip.test
@@ -0,0 +1,14 @@
+#! /bin/bash
+# This script tests: pnmtojbig jbigtopnm
+# Also requires: ppmtopgm
+
+  alias pnmtojbig="${PBM_TESTPREFIX}pnmtojbig"
+  alias jbigtopnm="${PBM_TESTPREFIX}jbigtopnm"
+  alias ppmtopgm="${PBM_BINPREFIX}ppmtopgm"
+  shopt -s expand_aliases
+
+# Test 1.  Should print 2425386270 41
+pnmtojbig testgrid.pbm | jbigtopnm | cksum
+
+# Test 2.  Should print 2871603838 33838
+ppmtopgm testimg.ppm | pnmtojbig | jbigtopnm | cksum
\ No newline at end of file