about summary refs log tree commit diff
path: root/test/cis-roundtrip.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-08-12 01:53:28 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2014-08-12 01:53:28 +0000
commit9870c37e41d719d5f85ab7e984699849f7d44a45 (patch)
tree2cc4238c91bd7e5bc39012abd1059e7caf809239 /test/cis-roundtrip.test
parent018221506c4a8ffdd65d18fb8a1c830577e1e2ba (diff)
downloadnetpbm-mirror-9870c37e41d719d5f85ab7e984699849f7d44a45.tar.gz
netpbm-mirror-9870c37e41d719d5f85ab7e984699849f7d44a45.tar.xz
netpbm-mirror-9870c37e41d719d5f85ab7e984699849f7d44a45.zip
Add new tests
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2247 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/cis-roundtrip.test')
-rwxr-xr-xtest/cis-roundtrip.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/cis-roundtrip.test b/test/cis-roundtrip.test
new file mode 100755
index 00000000..895fe60e
--- /dev/null
+++ b/test/cis-roundtrip.test
@@ -0,0 +1,20 @@
+#! /bin/bash
+# This script tests: pbmtocis cistopbm
+# Also requires: pbmmake pamenlarge pamcut
+
+  alias pbmtocis="${PBM_TESTPREFIX}pbmtocis"
+  alias cistopbm="${PBM_TESTPREFIX}cistopbm"
+  alias pbmmake="${PBM_BINPREFIX}pbmmake"
+  alias pamenlarge="${PBM_BINPREFIX}pamenlarge"
+  alias pamcut="${PBM_BINPREFIX}pamcut"
+  shopt -s expand_aliases
+
+# Output images produced by pbmtocis are of fixed size,
+# either 128x96 or 256x192.
+# Smaller input images are padded, larger ones are cropped.
+
+# Test 1. Should print 2631579683 1546
+pbmmake -g 128 96 | pbmtocis | cistopbm | cksum
+
+# Test 2. Should print 2425386270 41
+pbmtocis testgrid.pbm | cistopbm | pamcut 0 0 14 16 | cksum