diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-07-29 15:28:44 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-07-29 15:28:44 +0000 |
commit | 533dddde75d7eea32a0dcc98a503fbb56caf4a35 (patch) | |
tree | 8055ca1729b01185915885bc4650da2d11d32e30 /test | |
parent | 99a34892bfc27a57a0d2c26383689f9384996328 (diff) | |
download | netpbm-mirror-533dddde75d7eea32a0dcc98a503fbb56caf4a35.tar.gz netpbm-mirror-533dddde75d7eea32a0dcc98a503fbb56caf4a35.tar.xz netpbm-mirror-533dddde75d7eea32a0dcc98a503fbb56caf4a35.zip |
fix bugs in g3-roundtrip.tet
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3036 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rw-r--r-- | test/g3-roundtrip.ok | 3 | ||||
-rwxr-xr-x | test/g3-roundtrip.test | 25 |
2 files changed, 19 insertions, 9 deletions
diff --git a/test/g3-roundtrip.ok b/test/g3-roundtrip.ok index 4521d575..853d06d2 100644 --- a/test/g3-roundtrip.ok +++ b/test/g3-roundtrip.ok @@ -8,3 +8,6 @@ 0 0 0 +1777627284 265 +2985378006 3135 +3651878552 3135 diff --git a/test/g3-roundtrip.test b/test/g3-roundtrip.test index baa6ac31..10174733 100755 --- a/test/g3-roundtrip.test +++ b/test/g3-roundtrip.test @@ -19,12 +19,15 @@ pbmtog3 testgrid.pbm | \ g3topbm | pnmcrop -white -right -bottom | \ cmp -s - testgrid.pbm ; echo $? -awk 'BEGIN { print "P4"; # header - print "8 256"; - for (i=0;i<256;++i) # raster - printf("%c",i) }' > ${complete256_pbm} +# works with gawk and mawk +# produce all possible 8-bit patterns -pbmtog3 -nofixedwidth ${complete256_pbm} | g3topbm -width=8 | tee /tmp/z1 | \ +LC_ALL=C awk 'BEGIN { print "P4"; # header + print "8 256"; + for (i=0;i<256;++i) # raster + printf("%c",i) }' > ${complete256_pbm} + +pbmtog3 -nofixedwidth ${complete256_pbm} | g3topbm -width=8 | \ cmp -s - ${complete256_pbm} ; echo $? pbmtog3 -reverse -nofixedwidth ${complete256_pbm} | \ @@ -39,16 +42,20 @@ pbmtog3 -align16 ${complete256_pbm} | \ g3topbm -width=1728 | pnmcrop -white -right | \ cmp -s - ${complete256_pbm} ; echo $? -pbmmake -w 5000 5 | tee ${widew_pbm} | pbmtog3 -nofixedwidth | \ -g3topbm | \ +pbmmake -w 5000 5 > ${widew_pbm} +pbmtog3 -nofixedwidth ${widew_pbm} | g3topbm | \ cmp -s - ${widew_pbm} ; echo $? pbmtog3 -nofixedwidth ${widew_pbm} | \ g3topbm -width=5000 | \ cmp -s - ${widew_pbm} ; echo $? -pbmmake -b 5000 5 | tee ${wideb_pbm} | pbmtog3 -nofixedwidth | \ -g3topbm | \ +pbmmake -b 5000 5 > ${wideb_pbm} +pbmtog3 -nofixedwidth ${wideb_pbm} | g3topbm | \ cmp -s - ${wideb_pbm} ; echo $? +cat ${complete256_pbm} | cksum +cat ${wideb_pbm} | cksum +cat ${widew_pbm} | cksum + rm ${complete256_pbm} ${wideb_pbm} ${widew_pbm} |