diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-06-28 15:34:21 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2015-06-28 15:34:21 +0000 |
commit | 620ecbee2ed1cb478e0289722d86dd72717f1cb8 (patch) | |
tree | 7a427b24d86f6789706acee21a52dca15b88806b /test/macp-roundtrip.test | |
parent | 8c2dab4922b514045cbae8e71ba93aaf8c0fff48 (diff) | |
download | netpbm-mirror-620ecbee2ed1cb478e0289722d86dd72717f1cb8.tar.gz netpbm-mirror-620ecbee2ed1cb478e0289722d86dd72717f1cb8.tar.xz netpbm-mirror-620ecbee2ed1cb478e0289722d86dd72717f1cb8.zip |
Release 10.71.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2588 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/macp-roundtrip.test')
-rwxr-xr-x | test/macp-roundtrip.test | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/test/macp-roundtrip.test b/test/macp-roundtrip.test index 39228e5a..4774a2c2 100755 --- a/test/macp-roundtrip.test +++ b/test/macp-roundtrip.test @@ -1,15 +1,31 @@ #! /bin/bash # This script tests: pbmtomacp macptopbm -# Also requires: pamcrop pbmmake +# Also requires: pnmcrop pbmpage pbmupc pnmpad - alias pbmtomacp="${PBM_TESTPREFIX}pbmtomacp" - alias macptopbm="${PBM_TESTPREFIX}macptopbm" - alias pnmcrop="${PBM_BINPREFIX}pnmcrop" - alias pbmmake="${PBM_BINPREFIX}pbmmake" - shopt -s expand_aliases +tmpdir=${tmpdir:-/tmp} +temp1_pbm=${tmpdir}/temp1.ppm +temp2_pbm=${tmpdir}/temp2.ppm -#Test 1. Should produce 2425386270 41 -pbmtomacp testgrid.pbm | macptopbm | pnmcrop | cksum -#Test 2. Should produce 1005016577 51851 -pbmmake -g 576 720 | pbmtomacp | macptopbm | cksum +# Test 1. Should produce 2425386270 41 twice +# Because Macpaint files are fixed size (576 x 720 pixels) +# pbmtomacp automatically adds padding when input is smaller. + +pbmtomacp testgrid.pbm | macptopbm | tee ${temp1_pbm} | \ + pnmcrop | cksum + +pbmtomacp ${temp1_pbm} | macptopbm | pnmcrop | cksum + + +#Test 2. Should produce 2329957971 51851 +pbmpage 1 | pbmtomacp | macptopbm | cksum + + +#Test 3. Should produce 2907103393 5086 twice +pbmupc 0 12345 67890 | pnmpad -black -t 44 -b 20 -l 100 -r 251 | pbmtomacp | macptopbm | \ + tee ${temp2_pbm} | \ + pnmcrop | pnmcrop | cksum + +pbmtomacp ${temp2_pbm} | macptopbm | pnmcrop | pnmcrop | cksum + +rm ${temp1_pbm} ${temp2_pbm} |