about summary refs log tree commit diff
path: root/test/st4-roundtrip.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-02-08 01:57:46 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-02-08 01:57:46 +0000
commit2606d971b2a30e3d61644228b2b77e122a45acf6 (patch)
tree5952393dde9d4407ce2033ceae0881b791e25f6f /test/st4-roundtrip.test
parent9056e8d1aa0ab45096424666ce22d6b92f3b12b0 (diff)
downloadnetpbm-mirror-2606d971b2a30e3d61644228b2b77e122a45acf6.tar.gz
netpbm-mirror-2606d971b2a30e3d61644228b2b77e122a45acf6.tar.xz
netpbm-mirror-2606d971b2a30e3d61644228b2b77e122a45acf6.zip
Add roundtrip tests for sbig, st4
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2409 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/st4-roundtrip.test')
-rwxr-xr-xtest/st4-roundtrip.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/st4-roundtrip.test b/test/st4-roundtrip.test
new file mode 100755
index 00000000..bd3da5f1
--- /dev/null
+++ b/test/st4-roundtrip.test
@@ -0,0 +1,17 @@
+#! /bin/bash
+# This script tests: pgmtost4 st4topgm
+# Also requires: pamchannel pamtopnm pamcut
+
+  alias st4topgm="${PBM_TESTPREFIX}st4topgm"
+  alias pgmtost4="${PBM_TESTPREFIX}pgmtost4"
+  shopt -s expand_aliases
+
+# Input image of pgmtost4 must by 192x165
+
+# Should produce 185194654 31695 which is the output of:
+# pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | \
+#   pamtopnm | pamcut -pad 0 0 192 165 | cksum
+
+pamchannel -infile=testimg.ppm -tupletype="GRAYSCALE" 0 | \
+  pamtopnm | pamcut -pad 0 0 192 165 | \
+  pgmtost4 | st4topgm - | cksum