about summary refs log tree commit diff
path: root/test/utahrle-roundtrip.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/utahrle-roundtrip.test')
-rwxr-xr-xtest/utahrle-roundtrip.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/utahrle-roundtrip.test b/test/utahrle-roundtrip.test
new file mode 100755
index 00000000..7113a2d5
--- /dev/null
+++ b/test/utahrle-roundtrip.test
@@ -0,0 +1,14 @@
+#! /bin/bash
+# This script tests: pnmtorle rletopnm
+# Also requires: ppmtopgm
+
+#Test 1.  Should print 2871603838 33838, cksum of testimg.pgm
+${PBM_BINPREFIX}ppmtopgm testimg.ppm > ${tmpdir}/testimg.pgm
+${PBM_TESTPREFIX}pnmtorle ${tmpdir}/testimg.pgm | \
+  ${PBM_TESTPREFIX}rletopnm | cksum
+
+rm ${tmpdir}/testimg.pgm
+
+#Test 2.  Should print 1926073387 101484, cksum of testimg.ppm
+${PBM_TESTPREFIX}pnmtorle testimg.ppm | \
+  ${PBM_TESTPREFIX}rletopnm | cksum