diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
commit | 23ce26f64c34e30951ad9ade2151552ed77e7357 (patch) | |
tree | d73b31a0c2f7c7be4a69f8a8e84e00dd39c432b5 /test/cis-roundtrip.test | |
parent | 1b6e51a266008348ad93ed8b6ac9ec91b5024fea (diff) | |
download | netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.gz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.xz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.zip |
promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4558 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/cis-roundtrip.test')
-rwxr-xr-x | test/cis-roundtrip.test | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/cis-roundtrip.test b/test/cis-roundtrip.test index 62fcc3b9..ad34173e 100755 --- a/test/cis-roundtrip.test +++ b/test/cis-roundtrip.test @@ -1,14 +1,20 @@ -#! /bin/bash +#! /bin/sh # 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 |