diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2021-12-06 03:35:30 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2021-12-06 03:35:30 +0000 |
commit | b62eff9e0c76dcdab094bf9fe32355c543ea909f (patch) | |
tree | d9fcb02c5a8830d088657885f5e55340b29ae767 /test/g3-roundtrip.test | |
parent | 59bf40d2b1cfe85111b15ec05f8c124f657aefe2 (diff) | |
download | netpbm-mirror-b62eff9e0c76dcdab094bf9fe32355c543ea909f.tar.gz netpbm-mirror-b62eff9e0c76dcdab094bf9fe32355c543ea909f.tar.xz netpbm-mirror-b62eff9e0c76dcdab094bf9fe32355c543ea909f.zip |
Add maze.pbm test image, update tests to use it
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4200 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/g3-roundtrip.test')
-rwxr-xr-x | test/g3-roundtrip.test | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/g3-roundtrip.test b/test/g3-roundtrip.test index 603e6408..f35c4935 100755 --- a/test/g3-roundtrip.test +++ b/test/g3-roundtrip.test @@ -1,6 +1,6 @@ #! /bin/bash # This script tests: g3topbm pbmtog3 -# Also requires: pnmcrop pbmmake pbmpage pnmpad +# Also requires: pamfile pnmcrop pbmmake pbmpage pnmpad pamenlarge tmpdir=${tmpdir:-/tmp} complete256_pbm=${tmpdir}/complete256.pbm @@ -11,17 +11,19 @@ pagemax_pbm=${tmpdir}/pagemax.pbm echo "Test 1. Should print 0 0 0 : 0 or 0 0 0 0 : 0 total three times" -pbmtog3 -nofixedwidth testgrid.pbm | \ -g3topbm -width=14 | cmp -s - testgrid.pbm +width=$(pamfile -size maze.pbm | cut -d" " -f1) + +pbmtog3 -nofixedwidth maze.pbm | \ +g3topbm -width=${width} | cmp -s - maze.pbm echo ${PIPESTATUS[@]} ":" $? -pbmtog3 -nofixedwidth -reversebits testgrid.pbm | \ -g3topbm -width=14 -reversebits | cmp -s - testgrid.pbm +pbmtog3 -nofixedwidth -reversebits maze.pbm | \ +g3topbm -width=${width} -reversebits | cmp -s - maze.pbm echo ${PIPESTATUS[@]} ":" $? -pbmtog3 testgrid.pbm | \ +pbmtog3 maze.pbm | \ g3topbm | pnmcrop -white -right -bottom | \ - cmp -s - testgrid.pbm ; echo ${PIPESTATUS[@]} ":" $? + cmp -s - maze.pbm ; echo ${PIPESTATUS[@]} ":" $? echo "Test 2. Should print 0 0 0 : 0 or 0 0 0 0 : 0 total seven times" @@ -62,8 +64,6 @@ pbmmake -b 5000 5 > ${wideb_pbm} pbmtog3 -nofixedwidth ${wideb_pbm} | g3topbm | \ cmp -s - ${wideb_pbm} ; echo ${PIPESTATUS[@]} ":" $? - - cat ${complete256_pbm} | cksum cat ${wideb_pbm} | cksum cat ${widew_pbm} | cksum @@ -85,3 +85,4 @@ pbmtog3 -nofixedwidth ${pagemax_pbm} | g3topbm | \ cat ${page_pbm} | cksum cat ${pagemax_pbm} | cksum +rm ${page_pbm} ${pagemax_pbm} \ No newline at end of file |