diff options
Diffstat (limited to 'test/stdin-pgm2.test')
-rwxr-xr-x | test/stdin-pgm2.test | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/stdin-pgm2.test b/test/stdin-pgm2.test new file mode 100755 index 00000000..49fc4cda --- /dev/null +++ b/test/stdin-pgm2.test @@ -0,0 +1,44 @@ +#! /bin/sh +# This script tests: pgmtofs fstopgm pgmtolispm lispmtopgm pgmtost4 st4topgm +# Also requires: pgmmake + +tmpdir=${tmpdir:-/tmp} +test_pgm=${tmpdir}/test.pgm +out1=${tmpdir}/out1 +out2=${tmpdir}/out2 +out3=${tmpdir}/out3 +out4=${tmpdir}/out4 + +pgmmake 0.75 192 165 > ${test_pgm} + +for fmt in \ + fs \ + lispm \ + st4 + do + testprog1="pgmto"${fmt} + testprog2=${fmt}"topgm" + + ${testprog1} ${test_pgm} > ${out1}; status1=$? + ${testprog1} < ${test_pgm} > ${out2}; status2=$? + cmp -s ${out1} ${out2} + echo ${testprog1}" :" ${status1} ${status2} $? + + ${testprog2} ${out1} > ${out3}; status3=$? + ${testprog2} < ${out1} > ${out4}; status4=$? + cmp -s ${out3} ${out4} + echo ${testprog2}" :" ${status3} ${status4} $? + + rm ${out1} ${out2} ${out3} ${out4} + done + +rm ${test_pgm} + +# pgmtost4 size must be 192 x 165 + +# The following programs do not have converters in the opposite direction +# Bioradtopgm +# Hipstopgm +# Psidtopgm +# Rawtopgm +# Spottopgm |