diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-02-03 01:26:10 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-02-03 01:26:10 +0000 |
commit | be71d9f416a205d4dd977b93f5f96f97e8628cca (patch) | |
tree | 0426e2bf871948b1a3994a74671f75a3ec8a06e0 /test/stdin-pbm2.test | |
parent | 458cce2de894fb6d9383896d1cbd309ece582b34 (diff) | |
download | netpbm-mirror-be71d9f416a205d4dd977b93f5f96f97e8628cca.tar.gz netpbm-mirror-be71d9f416a205d4dd977b93f5f96f97e8628cca.tar.xz netpbm-mirror-be71d9f416a205d4dd977b93f5f96f97e8628cca.zip |
Add stdin tests, et al
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4272 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/stdin-pbm2.test')
-rwxr-xr-x | test/stdin-pbm2.test | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/test/stdin-pbm2.test b/test/stdin-pbm2.test new file mode 100755 index 00000000..b85c875c --- /dev/null +++ b/test/stdin-pbm2.test @@ -0,0 +1,67 @@ +#! /bin/sh +# This script tests: pbmtoatk atktopbm pbmtocis cistopbm pbmtocmuwm cmuwmtopbm +# This script tests: pbmtoescp2 escp2topbm pbmtog3 g3topbm pbmtogem gemtopnm +# This script tests: pbmtomacp macptopbm pbmtomda mdatopbm pbmtomgr mgrtopbm +# This script tests: pbmtomrf mrftopbm pbmtopi3 pi3topbm pbmtosunicon +# This script tests: sunicontopnm pbmtowbmp wbmptopbm pbmtoybm ybmtopbm +# Also requires: + +tmpdir=${tmpdir:-/tmp} +out1=${tmpdir}/out1 +out2=${tmpdir}/out2 +out3=${tmpdir}/out3 +out4=${tmpdir}/out4 + +for fmt in \ + atk \ + cis \ + cmuwm \ + escp2 \ + g3 \ + gem \ + macp \ + mda \ + mgr \ + mrf \ + pi3 \ + sunicon \ + wbmp \ + ybm + do + testprog1="pbmto"${fmt} + + if [ ${fmt} = "sunicon" -o ${fmt} = "gem" ]; + then testprog2=${fmt}"topnm"; + else testprog2=${fmt}"topbm"; + fi + + ${testprog1} testgrid.pbm > ${out1}; status1=$? + ${testprog1} < testgrid.pbm > ${out2}; status2=$? + cmp -s ${out1} ${out2} + echo ${testprog1}": "${status1} ${status2} $? + + ${testprog2} ${out1} > ${out3}; status3=$? + ${testprog2} < ${out1} > ${out4}; status4=$? + + if [ ${fmt} = "xbm" ]; + then sed -i '3s/noname/testgrid/' ${out3}; + fi + + cmp -s ${out3} ${out4} + echo ${testprog2}": "${status3} ${status4} $? + + rm ${out1} ${out2} ${out3} ${out4} + done + +# We don't test Pbmtopgm Pgmtopbm Asciitopbm Asciitopgm here + +# Pbmtopk Pktopbm require resolution output pk file, tk file +# some conditions apply to input image dimensions + +# These three programs embed the input file name in the output +# If the input is from stdin, "noname" +# Pbmtolps tested in lps-roundtrip.test +# Pbmtoxbm xbm-roundtrip.test +# Pbmtozinc pbm-misc-converters.test + +# Icontopbm Pbmtoicon Pbmtox10bm are legacy |