about summary refs log tree commit diff
path: root/test/stdin-pbm2.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-03-12 21:30:37 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-03-12 21:30:37 +0000
commit12fb730de9ce241bbb9f5accaf3ef7378d7f310d (patch)
tree9e343f0d57324a5e74f66ccb34d65be2f4e571a8 /test/stdin-pbm2.test
parent35631a7b3e08c1eedfe91c32be9a0a93effa07eb (diff)
downloadnetpbm-mirror-12fb730de9ce241bbb9f5accaf3ef7378d7f310d.tar.gz
netpbm-mirror-12fb730de9ce241bbb9f5accaf3ef7378d7f310d.tar.xz
netpbm-mirror-12fb730de9ce241bbb9f5accaf3ef7378d7f310d.zip
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
Diffstat (limited to 'test/stdin-pbm2.test')
-rwxr-xr-xtest/stdin-pbm2.test37
1 files changed, 24 insertions, 13 deletions
diff --git a/test/stdin-pbm2.test b/test/stdin-pbm2.test
index b85c875c..724a9934 100755
--- a/test/stdin-pbm2.test
+++ b/test/stdin-pbm2.test
@@ -1,9 +1,18 @@
 #! /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
+# This script tests: atktopbm pbmtoatk
+# This script tests: cistopbm pbmtocis
+# This script tests: cmuwmtopbm pbmtocmuwm
+# This script tests: escp2topbm pbmtoescp2
+# This script tests: g3topbm pbmtog3
+# This script tests: gemtopbm pbmtogem
+# This script tests: macptopbm pbmtomacp
+# This script tests: mdatopbm pbmtomda
+# This script tests: mgrtopbm pbmtomgr
+# This script tests: mrftopbm pbmtomrf
+# This script tests: pi3topbm pbmtopi3
+# This script tests: sunicontopbm pbmtosunicon
+# This script tests: wbmptopbm pbmtowbmp
+# This script tests: ybmtopbm pbmtoybm
 # Also requires:
 
 tmpdir=${tmpdir:-/tmp}
@@ -35,22 +44,24 @@ for fmt in  \
     else testprog2=${fmt}"topbm";
   fi
 
-  ${testprog1} testgrid.pbm > ${out1};      status1=$?
-  ${testprog1} < testgrid.pbm > ${out2};    status2=$?
+  ${testprog1} testgrid.pbm > ${out1};     status1=$?
+  ${testprog1} < testgrid.pbm > ${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=$?
 
   if [ ${fmt} = "xbm" ];
     then sed -i '3s/noname/testgrid/' ${out3};
-  fi       
+  fi
 
+  test -s ${out3};                         status5=$?
   cmp -s ${out3} ${out4}
-  echo ${testprog2}": "${status3} ${status4} $?
-  
-  rm ${out1} ${out2} ${out3} ${out4}
+  echo ${testprog2}": "${status3} ${status4} ${status5} $?
+  rm ${out1} ${out3} ${out4}
   done
 
 # We don't test Pbmtopgm Pgmtopbm Asciitopbm Asciitopgm here