From 12fb730de9ce241bbb9f5accaf3ef7378d7f310d Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 12 Mar 2022 21:30:37 +0000 Subject: New stdin tests; test whether output is actually produced git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4305 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- test/stdin-pgm2.test | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'test/stdin-pgm2.test') diff --git a/test/stdin-pgm2.test b/test/stdin-pgm2.test index 49fc4cda..3a6220d8 100755 --- a/test/stdin-pgm2.test +++ b/test/stdin-pgm2.test @@ -1,5 +1,7 @@ #! /bin/sh -# This script tests: pgmtofs fstopgm pgmtolispm lispmtopgm pgmtost4 st4topgm +# This script tests: pgmtofs fstopgm +# This script tests: pgmtolispm lispmtopgm +# This script tests: pgmtost4 st4topgm # Also requires: pgmmake tmpdir=${tmpdir:-/tmp} @@ -18,27 +20,30 @@ for fmt in \ do testprog1="pgmto"${fmt} testprog2=${fmt}"topgm" - + ${testprog1} ${test_pgm} > ${out1}; status1=$? ${testprog1} < ${test_pgm} > ${out2}; status2=$? + test -s ${out1}; status3=$? cmp -s ${out1} ${out2} - echo ${testprog1}" :" ${status1} ${status2} $? + echo ${testprog1}" :" ${status1} ${status2} ${status3} $? + rm ${out2} - ${testprog2} ${out1} > ${out3}; status3=$? - ${testprog2} < ${out1} > ${out4}; status4=$? + ${testprog2} ${out1} > ${out3}; status4=$? + ${testprog2} < ${out1} > ${out4}; status5=$? + test -s ${out3}; status6=$? cmp -s ${out3} ${out4} - echo ${testprog2}" :" ${status3} ${status4} $? - - rm ${out1} ${out2} ${out3} ${out4} + echo ${testprog2}" :" ${status4} ${status5} ${status6} $? + + rm ${out1} ${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 +# The following programs do not have converters in the opposite direction: +# Bioradtopgm +# Hipstopgm +# Psidtopgm # Rawtopgm -# Spottopgm +# Spottopgm -- cgit 1.4.1