From 533dddde75d7eea32a0dcc98a503fbb56caf4a35 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 29 Jul 2017 15:28:44 +0000 Subject: fix bugs in g3-roundtrip.tet git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3036 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/g3-roundtrip.test | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'test/g3-roundtrip.test') 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} -- cgit 1.4.1