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>2021-12-27 17:33:56 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2021-12-27 17:33:56 +0000
commit6e629f983aa205c3eaa5f339f1c71bb5e7938049 (patch)
treea89f594443ac2330138f0bd0f19ee59135c2213f /test/cis-roundtrip.test
parentec52f41aabc9de9aac203c2f462252e403c7374a (diff)
downloadnetpbm-mirror-6e629f983aa205c3eaa5f339f1c71bb5e7938049.tar.gz
netpbm-mirror-6e629f983aa205c3eaa5f339f1c71bb5e7938049.tar.xz
netpbm-mirror-6e629f983aa205c3eaa5f339f1c71bb5e7938049.zip
Promote Development to Advanced to make Release 10.97.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4222 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/cis-roundtrip.test')
-rwxr-xr-xtest/cis-roundtrip.test16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/cis-roundtrip.test b/test/cis-roundtrip.test
index 62fcc3b9..4ad1a5e4 100755
--- a/test/cis-roundtrip.test
+++ b/test/cis-roundtrip.test
@@ -1,14 +1,20 @@
 #! /bin/bash
 # This script tests: pbmtocis cistopbm
-# Also requires: pbmmake pamcut
+# Also requires: pbmmake pamcut pamfile
 
+tmpdir=${tmpdir:-/tmp}
+test_pbm=${tmpdir}/test.pbm
 
 # 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
+echo "Test 1. Should print 2631579683 1546 twice"
+pbmmake -g 128 96 | tee ${test_pbm} | cksum
+pbmtocis ${test_pbm} | cistopbm | cksum
 
-# Test 2. Should print 2425386270 41
-pbmtocis testgrid.pbm | cistopbm | pamcut 0 0 14 16 | cksum
+echo "Test 2. Should print 281226646 481, cksum of maze.pbm"
+size=$(pamfile -size maze.pbm | awk '{print "-width="$1,"-height="$2}')
+pbmtocis maze.pbm | cistopbm | pamcut -left=0 -top=0 ${size} | cksum
+
+rm ${test_pbm}
\ No newline at end of file