about summary refs log tree commit diff
path: root/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
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')
-rw-r--r--test/Test-Order1
-rw-r--r--test/stdin-pam1.ok83
-rwxr-xr-xtest/stdin-pam1.test8
-rw-r--r--test/stdin-pam2.ok10
-rwxr-xr-xtest/stdin-pam2.test19
-rw-r--r--test/stdin-pam3.ok32
-rwxr-xr-xtest/stdin-pam3.test73
-rw-r--r--test/stdin-pbm1.ok18
-rwxr-xr-xtest/stdin-pbm1.test6
-rw-r--r--test/stdin-pbm2.ok56
-rwxr-xr-xtest/stdin-pbm2.test37
-rw-r--r--test/stdin-pgm1.ok22
-rwxr-xr-xtest/stdin-pgm1.test3
-rw-r--r--test/stdin-pgm2.ok12
-rwxr-xr-xtest/stdin-pgm2.test31
-rw-r--r--test/stdin-pnm1.ok46
-rwxr-xr-xtest/stdin-pnm1.test5
-rw-r--r--test/stdin-pnm2.ok52
-rwxr-xr-xtest/stdin-pnm2.test46
-rw-r--r--test/stdin-ppm1.ok30
-rwxr-xr-xtest/stdin-ppm1.test3
-rw-r--r--test/stdin-ppm2.ok21
-rwxr-xr-xtest/stdin-ppm2.test35
-rw-r--r--test/stdin-ppm3.ok40
-rwxr-xr-xtest/stdin-ppm3.test66
25 files changed, 463 insertions, 292 deletions
diff --git a/test/Test-Order b/test/Test-Order
index 5962348f..dd89a91c 100644
--- a/test/Test-Order
+++ b/test/Test-Order
@@ -143,6 +143,7 @@ stdin-pnm1.test
 stdin-pnm2.test
 stdin-pam1.test
 stdin-pam2.test
+stdin-pam3.test
 
 pbm-misc-converters.test
 
diff --git a/test/stdin-pam1.ok b/test/stdin-pam1.ok
index 6bf37d90..31f24b3d 100644
--- a/test/stdin-pam1.ok
+++ b/test/stdin-pam1.ok
@@ -1,42 +1,41 @@
-pamaddnoise -seed=1: 0 0 0
-pamaltsat -strength=1: 0 0 0
-pambackground: 0 0 0
-pambayer -type=2: 0 0 0
-pambrighten: 0 0 0
-pamcut: 0 0 0
-pamdeinterlace: 0 0 0
-pamdepth 15: 0 0 0
-pamditherbw -threshold: 0 0 0
-pamedge: 0 0 0
-pamexec cat: 0 0 0
-pamfile -size: 0 0 0
-pamfind -target=1: 0 0 0
-pamfix: 0 0 0
-pamflip -lr: 0 0 0
-pamfunc -not: 0 0 0
-pamhomography -from 0,0,0,1,1,0,1,1: 0 0 0
-pamhue -huechange=60: 0 0 0
-pamlevels -f1 rgb:0/0/0 -t1 rgb:0/0/0 -f2 rgb:ff/ff/ff -t2 rgb:ff/ff/ff: 0 0 0
-pammixinterlace: 0 0 0
-pammosaicknit: 0 0 0
-pamoil: 0 0 0
-pamperspective 0 0 0 1 1 0 1 1: 0 0 0
-pamrecolor: 0 0 0
-pamrubber -quad 1 1 2 2: 0 0 0
-pamscale 2: 0 0 0
-pamshadedrelief: 0 0 0
-pamsharpness: 0 0 0
-pamsistoaglyph: 0 0 0
-pamslice -row=1: 0 0 0
-pamsplit: 0 0 0
-pamstack: 0 0 0
-pamstereogram -randomseed=1: 0 0 0
-pamstretch 1: 0 0 0
-pamstretch-gen 1: 0 0 0
-pamsumm -max: 0 0 0
-pamsummcol -mean: 0 0 0
-pamtable: 0 0 0
-pamthreshold: 0 0 0
-pamtilt: 0 0 0
-pamtopnm: 0 0 0
-pamwipeout -tb: 0 0 0
+pamaddnoise -seed=1: 0 0 0 0
+pamaltsat -strength=1: 0 0 0 0
+pambackground: 0 0 0 0
+pambayer -type=2: 0 0 0 0
+pambrighten: 0 0 0 0
+pamcut: 0 0 0 0
+pamdeinterlace: 0 0 0 0
+pamdepth 15: 0 0 0 0
+pamditherbw -threshold: 0 0 0 0
+pamedge: 0 0 0 0
+pamexec cat: 0 0 0 0
+pamfile -size: 0 0 0 0
+pamfind -target=1: 0 0 0 0
+pamfix: 0 0 0 0
+pamflip -lr: 0 0 0 0
+pamfunc -not: 0 0 0 0
+pamhomography -from 0,0,0,1,1,0,1,1: 0 0 0 0
+pamhue -huechange=60: 0 0 0 0
+pamlevels -f1 rgb:0/0/0 -t1 rgb:0/0/0 -f2 rgb:ff/ff/ff -t2 rgb:ff/ff/ff: 0 0 0 0
+pammixinterlace: 0 0 0 0
+pammosaicknit: 0 0 0 0
+pamoil: 0 0 0 0
+pamperspective 0 0 0 1 1 0 1 1: 0 0 0 0
+pamrecolor: 0 0 0 0
+pamrubber -quad 1 1 2 2: 0 0 0 0
+pamscale 2: 0 0 0 0
+pamshadedrelief: 0 0 0 0
+pamsharpness: 0 0 0 0
+pamsistoaglyph: 0 0 0 0
+pamslice -row=1: 0 0 0 0
+pamstack: 0 0 0 0
+pamstereogram -randomseed=1: 0 0 0 0
+pamstretch 1: 0 0 0 0
+pamstretch-gen 1: 0 0 0 0
+pamsumm -max: 0 0 0 0
+pamsummcol -mean: 0 0 0 0
+pamtable: 0 0 0 0
+pamthreshold: 0 0 0 0
+pamtilt: 0 0 0 0
+pamtopnm: 0 0 0 0
+pamwipeout -tb: 0 0 0 0
diff --git a/test/stdin-pam1.test b/test/stdin-pam1.test
index 98904721..68d0d34c 100755
--- a/test/stdin-pam1.test
+++ b/test/stdin-pam1.test
@@ -6,7 +6,7 @@
 # This script tests: pammixinterlace pammosaicknit pamoil
 # This script tests: pamperspective pamrecolor pamrubber pamscale
 # This script tests: pamshadedrelief pamsharpness pamsistoaglyph
-# This script tests: pamslice pamsplit pamstack pamstereogram pamstretch
+# This script tests: pamslice pamstack pamstereogram pamstretch
 # This script tests: pamstretch-gen pamsumm pamsummcol pamtable pamthreshold
 # This script tests: pamtilt pamtopnm pamwipeout
 # Also requires: pbmmake
@@ -49,7 +49,6 @@ for testprog in \
     pamsharpness \
     pamsistoaglyph \
     "pamslice -row=1" \
-    pamsplit \
     pamstack \
     "pamstereogram -randomseed=1" \
     "pamstretch 1" \
@@ -60,12 +59,13 @@ for testprog in \
     pamthreshold \
     pamtilt \
     pamtopnm \
-    "pamwipeout -tb"   
+    "pamwipeout -tb"
   do
   ${testprog} ${small_pbm} > ${out1};      status1=$?
   ${testprog} < ${small_pbm} > ${out2};    status2=$?
+  test -s ${out1};                         status3=$?
   cmp -s ${out1} ${out2}
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out2}
   done
 
diff --git a/test/stdin-pam2.ok b/test/stdin-pam2.ok
index 69129c0b..dd3148e8 100644
--- a/test/stdin-pam2.ok
+++ b/test/stdin-pam2.ok
@@ -1,5 +1,5 @@
-pammasksharpen: 0 0 0
-pammixmulti: 0 0 0
-pamdice: 0 0 0
-pamlookup: 0 0 0
-pamunlookup: 0 0 0
+pammasksharpen: 0 0 0 0
+pammixmulti: 0 0 0 0
+pamdice: 0 0 0 0
+pamlookup: 0 0 0 0
+pamunlookup: 0 0 0 0
diff --git a/test/stdin-pam2.test b/test/stdin-pam2.test
index 8c18afde..f47df604 100755
--- a/test/stdin-pam2.test
+++ b/test/stdin-pam2.test
@@ -18,22 +18,27 @@ for testprog in \
   do
   ${testprog} ${small_pbm}   ${small_pbm} > ${out1};   status1=$?
   ${testprog} ${small_pbm} < ${small_pbm} > ${out2};   status2=$?
+  test -s ${out1};                                     status3=$?
   cmp -s ${out1} ${out2}
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out2}
-  done
+done
+
 
   dicestem=${tmpdir}/dice
 
   testprog="pamdice -outstem=${dicestem}"
-  ${testprog} ${small_pbm}; status1=$?
+  ${testprog} ${small_pbm};   status1=$?
   cat ${dicestem}_*_*.pbm > ${out1}
   rm ${dicestem}_*_*.pbm
   ${testprog} < ${small_pbm}; status2=$?
   cat ${dicestem}_*_*.pbm > ${out2}
   rm ${dicestem}_*_*.pbm
+  test -s ${out1};            status3=$?
   cmp -s ${out1} ${out2}
-  echo pamdice: ${status1} ${status2} $?
+  echo pamdice: ${status1} ${status2} ${status3} $?
+  # Do not use testprog, which contains a variable, in the above
+  # Same for pamlookup, pamunlookup
   rm ${out1} ${out2}
 
 lookup_ppm=${tmpdir}/lookup.ppm
@@ -49,15 +54,17 @@ EOF
   testprog="pamlookup -lookupfile=${lookup_ppm}"
   ${testprog}   ${small_pbm} > ${out1}; status1=$?
   ${testprog} < ${small_pbm} > ${out2}; status2=$?
+  test -s ${out1};                      status3=$?
   cmp -s ${out1} ${out2}
-  echo pamlookup": "${status1} ${status2} $?
+  echo pamlookup": "${status1} ${status2} ${status3} $?
   rm ${out2}
 
   testprog="pamunlookup -lookupfile=${lookup_ppm}"
   ${testprog}   ${out1} > ${out3}; status1=$?
   ${testprog} < ${out1} > ${out4}; status2=$?
+  test -s ${out1};                 status3=$?
   cmp -s ${out3} ${out4}
-  echo pamunlookup": "${status1} ${status2} $?
+  echo pamunlookup": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out3} ${out4}
 
 rm ${lookup_ppm} ${small_pbm}
diff --git a/test/stdin-pam3.ok b/test/stdin-pam3.ok
new file mode 100644
index 00000000..0ec9cf5d
--- /dev/null
+++ b/test/stdin-pam3.ok
@@ -0,0 +1,32 @@
+Test.  Should print (command): 0 0 0 0
+The following are exceptions: should print (command): 0 0 0 1
+pamtotga, pamtotiff
+
+pamtoavs: 0 0 0 0
+avstopam: 0 0 0 0
+pamtohdiff: 0 0 0 0
+hdifftopam: 0 0 0 0
+pamtojpeg2k: 0 0 0 0
+jpeg2ktopam: 0 0 0 0
+pamtopdbimg -fixedtime: 0 0 0 0
+pdbimgtopam: 0 0 0 0
+pamtopfm: 0 0 0 0
+pfmtopam: 0 0 0 0
+pamtopng: 0 0 0 0
+pngtopam: 0 0 0 0
+pamtosrf: 0 0 0 0
+srftopam: 0 0 0 0
+pamtosvg: 0 0 0 0
+svgtopam: 0 0 0 0
+pamtowinicon: 0 0 0 0
+winicontopam: 0 0 0 0
+pamtotga: 0 0 0 1
+tgatoppm: 0 0 0 0
+pamtoxvmini: 0 0 0 0
+xvminitoppm: 0 0 0 0
+pamtofits: 0 0 0 0
+fitstopnm: 0 0 0 0
+pamtogif: 0 0 0 0
+giftopnm: 0 0 0 0
+pamtotiff: 0 0 0 1
+tifftopnm: 0 0 0 0
diff --git a/test/stdin-pam3.test b/test/stdin-pam3.test
new file mode 100755
index 00000000..169bb5cd
--- /dev/null
+++ b/test/stdin-pam3.test
@@ -0,0 +1,73 @@
+#! /bin/sh
+# This script tests: pamtoavs avstopam
+# This script tests: pamtohdiff hdifftopam
+# This script tests: pamtojpeg2k jpeg2ktopam
+# This script tests: pamtopdbimg pdbimgtopam
+# This script tests: pamtopfm pfmtopam
+# This script tests: pamtopng pngtopam
+# This script tests: pamtosrf srftopam
+# This script tests: pamtosvg svgtopam
+# This script tests: pamtowinicon winicontopam
+# This script tests: pamtotga tgatoppm
+# This script tests: pamtoxvmini xvminitoppm
+# This script tests: pamtofits fitstopnm
+# This script tests: pamtogif giftopnm
+# This script tests: pamtotiff tifftopnm
+# Also requires: pgmmake
+
+tmpdir=${tmpdir:-/tmp}
+test_pgm=${tmpdir}/test.ppm
+out1=${tmpdir}/out1
+out2=${tmpdir}/out2
+out3=${tmpdir}/out3
+out4=${tmpdir}/out4
+
+pgmmake -maxval 3 0.25 32 32 > ${test_pgm}
+
+echo "Test.  Should print (command): 0 0 0 0"
+echo "The following are exceptions: should print (command): 0 0 0 1"
+echo "pamtotga, pamtotiff"
+echo
+
+for fmt in \
+    avs \
+    hdiff \
+    jpeg2k \
+    pdbimg \
+    pfm \
+    png \
+    srf \
+    svg \
+    winicon \
+    tga \
+    xvmini \
+    fits \
+    gif \
+    tiff
+  do
+
+  if [ ${fmt} = pdbimg ]
+      then testprog1="pamtopdbimg -fixedtime";
+      else testprog1="pamto"${fmt};
+  fi
+
+  case $fmt in
+      "tga" | "xvmini")        testprog2=${fmt}"toppm";;
+      "fits" | "gif" | "tiff") testprog2=${fmt}"topnm";;
+      *) testprog2=${fmt}"topam";
+  esac
+
+  ${testprog1} ${test_pgm} > ${out1};      status1=$?
+  ${testprog1} < ${test_pgm} > ${out2};    status2=$?
+  test -s ${out1};                         status3=$?
+  cmp -s ${out1} ${out2}
+  echo ${testprog1}": "${status1} ${status2} ${status3} $?
+
+  ${testprog2} ${out1} > ${out3};      status4=$?
+  ${testprog2} < ${out1} > ${out4};    status5=$?
+  test -s ${out3};                     status6=$?
+  cmp -s ${out3} ${out4}
+  echo ${testprog2}": "${status4} ${status5} ${status6} $?
+  done
+
+rm ${test_pgm}
diff --git a/test/stdin-pbm1.ok b/test/stdin-pbm1.ok
index 30eaf634..0dd83466 100644
--- a/test/stdin-pbm1.ok
+++ b/test/stdin-pbm1.ok
@@ -1,9 +1,9 @@
-pbmclean: 0 0 0
-pbmlife: 0 0 0
-pbmmask: 0 0 0
-pbmminkowski: 0 0 0
-pbmtoepsi: 0 0 0
-pbmtopsg3: 0 0 0
-pbmpscale 1 : 0 0 0
-pbmreduce -threshold 2 : 0 0 0
-pbmtopgm 2 2 : 0 0 0
+pbmclean: 0 0 0 0
+pbmlife: 0 0 0 0
+pbmmask: 0 0 0 0
+pbmminkowski: 0 0 0 0
+pbmtoepsi: 0 0 0 0
+pbmtopsg3: 0 0 0 0
+pbmpscale 1 : 0 0 0 0
+pbmreduce -threshold 2 : 0 0 0 0
+pbmtopgm 2 2 : 0 0 0 0
diff --git a/test/stdin-pbm1.test b/test/stdin-pbm1.test
index 2155b3fa..4e99ba0b 100755
--- a/test/stdin-pbm1.test
+++ b/test/stdin-pbm1.test
@@ -29,15 +29,17 @@ for testprog in \
   do
   ${testprog} ${small_pbm} > ${out1};      status1=$?
   ${testprog} < ${small_pbm} > ${out2};    status2=$?
+  test -s ${out1};                         status3=$?
   cmp -s ${out1} ${out2}
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
+  rm ${out1} ${out2}
   done
 
 rm ${small_pbm}
 
 # For Pbm converters not tested here see pbm-misc-converters.test
 
-# These programs do not have a converter in the opposite direction: 
+# These programs do not have a converter in the opposite direction:
 # Brushtopbm
 # Ddbugtopbm
 # Thinkjettopbm (?)
diff --git a/test/stdin-pbm2.ok b/test/stdin-pbm2.ok
index 0b946f90..c77f7b13 100644
--- a/test/stdin-pbm2.ok
+++ b/test/stdin-pbm2.ok
@@ -1,28 +1,28 @@
-pbmtoatk: 0 0 0
-atktopbm: 0 0 0
-pbmtocis: 0 0 0
-cistopbm: 0 0 0
-pbmtocmuwm: 0 0 0
-cmuwmtopbm: 0 0 0
-pbmtoescp2: 0 0 0
-escp2topbm: 0 0 0
-pbmtog3: 0 0 0
-g3topbm: 0 0 0
-pbmtogem: 0 0 0
-gemtopnm: 0 0 0
-pbmtomacp: 0 0 0
-macptopbm: 0 0 0
-pbmtomda: 0 0 0
-mdatopbm: 0 0 0
-pbmtomgr: 0 0 0
-mgrtopbm: 0 0 0
-pbmtomrf: 0 0 0
-mrftopbm: 0 0 0
-pbmtopi3: 0 0 0
-pi3topbm: 0 0 0
-pbmtosunicon: 0 0 0
-sunicontopnm: 0 0 0
-pbmtowbmp: 0 0 0
-wbmptopbm: 0 0 0
-pbmtoybm: 0 0 0
-ybmtopbm: 0 0 0
+pbmtoatk: 0 0 0 0
+atktopbm: 0 0 0 0
+pbmtocis: 0 0 0 0
+cistopbm: 0 0 0 0
+pbmtocmuwm: 0 0 0 0
+cmuwmtopbm: 0 0 0 0
+pbmtoescp2: 0 0 0 0
+escp2topbm: 0 0 0 0
+pbmtog3: 0 0 0 0
+g3topbm: 0 0 0 0
+pbmtogem: 0 0 0 0
+gemtopnm: 0 0 0 0
+pbmtomacp: 0 0 0 0
+macptopbm: 0 0 0 0
+pbmtomda: 0 0 0 0
+mdatopbm: 0 0 0 0
+pbmtomgr: 0 0 0 0
+mgrtopbm: 0 0 0 0
+pbmtomrf: 0 0 0 0
+mrftopbm: 0 0 0 0
+pbmtopi3: 0 0 0 0
+pi3topbm: 0 0 0 0
+pbmtosunicon: 0 0 0 0
+sunicontopnm: 0 0 0 0
+pbmtowbmp: 0 0 0 0
+wbmptopbm: 0 0 0 0
+pbmtoybm: 0 0 0 0
+ybmtopbm: 0 0 0 0
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
diff --git a/test/stdin-pgm1.ok b/test/stdin-pgm1.ok
index f2dc323c..b3159517 100644
--- a/test/stdin-pgm1.ok
+++ b/test/stdin-pgm1.ok
@@ -1,11 +1,11 @@
-pgmabel: 0 0 0
-pgmbentley: 0 0 0
-pgmdeshadow: 0 0 0
-pgmenhance: 0 0 0
-pgmhist: 0 0 0
-pgmmedian: 0 0 0
-pgmminkowski: 0 0 0
-pgmtexture: 0 0 0
-pgmtopbm -th : 0 0 0
-pgmtoppm rgb:00/00/00 : 0 0 0
-rawtopgm -headerskip 11 3 3 : 0 0 0
+pgmabel: 0 0 0 0
+pgmbentley: 0 0 0 0
+pgmdeshadow: 0 0 0 0
+pgmenhance: 0 0 0 0
+pgmhist: 0 0 0 0
+pgmmedian: 0 0 0 0
+pgmminkowski: 0 0 0 0
+pgmtexture: 0 0 0 0
+pgmtopbm -th : 0 0 0 0
+pgmtoppm rgb:00/00/00 : 0 0 0 0
+rawtopgm -headerskip 11 3 3 : 0 0 0 0
diff --git a/test/stdin-pgm1.test b/test/stdin-pgm1.test
index 40376e88..f5980cdc 100755
--- a/test/stdin-pgm1.test
+++ b/test/stdin-pgm1.test
@@ -28,8 +28,9 @@ for testprog in  \
   do
   ${testprog} ${small_pgm} > ${out1};      status1=$?
   ${testprog} < ${small_pgm} > ${out2};    status2=$?
+  test -s ${out1};                         status3=$?
   cmp -s ${out1} ${out2}
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out2}
   done
 
diff --git a/test/stdin-pgm2.ok b/test/stdin-pgm2.ok
index 719dff1d..ee6d8082 100644
--- a/test/stdin-pgm2.ok
+++ b/test/stdin-pgm2.ok
@@ -1,6 +1,6 @@
-pgmtofs : 0 0 0
-fstopgm : 0 0 0
-pgmtolispm : 0 0 0
-lispmtopgm : 0 0 0
-pgmtost4 : 0 0 0
-st4topgm : 0 0 0
+pgmtofs : 0 0 0 0
+fstopgm : 0 0 0 0
+pgmtolispm : 0 0 0 0
+lispmtopgm : 0 0 0 0
+pgmtost4 : 0 0 0 0
+st4topgm : 0 0 0 0
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
diff --git a/test/stdin-pnm1.ok b/test/stdin-pnm1.ok
index 53adea98..0a63558c 100644
--- a/test/stdin-pnm1.ok
+++ b/test/stdin-pnm1.ok
@@ -1,23 +1,23 @@
-pnmalias: 0 0 0
-pnmcat -lr : 0 0 0
-pnmcolormap all : 0 0 0
-pnmconvol -matrix=-1,3,-1 : 0 0 0
-pnmcrop: 0 0 0
-pnmgamma -ungamma 0.5 : 0 0 0
-pnmhisteq: 0 0 0
-pnmhistmap: 0 0 0
-pnminvert: 0 0 0
-pnmmargin 2 : 0 0 0
-pnmmercator: 0 0 0
-pnmmontage: 0 0 0
-pnmnlfilt 0.5 0.5 : 0 0 0
-pnmnorm: 0 0 0
-pnmpad: 0 0 0
-pnmquant 64 : 0 0 0
-pnmrotate 90 : 0 0 0
-pnmscalefixed 1 : 0 0 0
-pnmshear 45 : 0 0 0
-pnmsmooth: 0 0 0
-pnmtile 4 4 : 0 0 0
-pnmtoddif: 0 0 0
-pnmtopclxl -colorok : 0 0 0
+pnmalias: 0 0 0 0
+pnmcat -lr : 0 0 0 0
+pnmcolormap all : 0 0 0 0
+pnmconvol -matrix=-1,3,-1 : 0 0 0 0
+pnmcrop: 0 0 0 0
+pnmgamma -ungamma 0.5 : 0 0 0 0
+pnmhisteq: 0 0 0 0
+pnmhistmap: 0 0 0 0
+pnminvert: 0 0 0 0
+pnmmargin 2 : 0 0 0 0
+pnmmercator: 0 0 0 0
+pnmmontage: 0 0 0 0
+pnmnlfilt 0.5 0.5 : 0 0 0 0
+pnmnorm: 0 0 0 0
+pnmpad: 0 0 0 0
+pnmquant 64 : 0 0 0 0
+pnmrotate 90 : 0 0 0 0
+pnmscalefixed 1 : 0 0 0 0
+pnmshear 45 : 0 0 0 0
+pnmsmooth: 0 0 0 0
+pnmtile 4 4 : 0 0 0 0
+pnmtoddif: 0 0 0 0
+pnmtopclxl -colorok : 0 0 0 0
diff --git a/test/stdin-pnm1.test b/test/stdin-pnm1.test
index e88ceb09..e692ceba 100755
--- a/test/stdin-pnm1.test
+++ b/test/stdin-pnm1.test
@@ -40,8 +40,9 @@ for testprog in  \
   do
   ${testprog} ${small_ppm} > ${out1};      status1=$?
   ${testprog} < ${small_ppm} > ${out2};    status2=$?
+  test -s ${out1};                         status3=$?
   cmp -s ${out1} ${out2}
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out2}
   done
 
@@ -49,7 +50,7 @@ for testprog in  \
 rm ${small_ppm}
 
 # Pnmquantall: overwrites input files
-# Pnmremap:  requires -mapfile=file
+# Pnmremap: requires -mapfile=file
 # Pnmpsnr : compares two input files
 # Pnmindex: no input from stdin
 # Pnmpaste: requires two input files
diff --git a/test/stdin-pnm2.ok b/test/stdin-pnm2.ok
index 8c3db709..093ff3f7 100644
--- a/test/stdin-pnm2.ok
+++ b/test/stdin-pnm2.ok
@@ -1,28 +1,28 @@
 Test.  Should print (command): 0 0 0
-The following are exceptions: should print (command): 0 0 1
-pnmtops, pstopnm, pnmtorle, pnmtoxwd, pnmtotiffcmyk
+The following are exceptions: should print (command): 0 0 0 1
+pnmtops, pstopnm, pnmtoxwd, pnmtotiffcmyk
 
-pnmtofiasco --progress-meter 0 : 0 0 0
-fiascotopnm: 0 0 0
-pnmtojbig: 0 0 0
-jbigtopnm: 0 0 0
-pnmtojpeg: 0 0 0
-jpegtopnm: 0 0 0
-pnmtopalm: 0 0 0
-palmtopnm: 0 0 0
-pnmtopng: 0 0 0
-pngtopam: 0 0 0
-pnmtops: 0 0 1
-pstopnm: 0 0 1
-pnmtorast: 0 0 0
-rasttopnm: 0 0 0
-pnmtorle: 0 0 1
-rletopnm: 0 0 0
-pnmtosgi: 0 0 0
-sgitopnm: 0 0 0
-pnmtosir: 0 0 0
-sirtopnm: 0 0 0
-pnmtoxwd: 0 0 1
-xwdtopnm: 0 0 0
-pnmtotiffcmyk: 0 0 1
-tifftopnm: 0 0 0
+pnmtofiasco --progress-meter 0 : 0 0 0 0
+fiascotopnm: 0 0 0 0
+pnmtojbig: 0 0 0 0
+jbigtopnm: 0 0 0 0
+pnmtojpeg: 0 0 0 0
+jpegtopnm: 0 0 0 0
+pnmtopalm: 0 0 0 0
+palmtopnm: 0 0 0 0
+pnmtopng: 0 0 0 0
+pngtopam: 0 0 0 0
+pnmtops: 0 0 0 1
+pstopnm -stdout : 0 0 0 1
+pnmtorast: 0 0 0 0
+rasttopnm: 0 0 0 0
+pnmtorle: 0 0 0 0
+rletopnm: 0 0 0 0
+pnmtosgi: 0 0 0 0
+sgitopnm: 0 0 0 0
+pnmtosir: 0 0 0 0
+sirtopnm: 0 0 0 0
+pnmtoxwd: 0 0 0 1
+xwdtopnm: 0 0 0 0
+pnmtotiffcmyk: 0 0 0 1
+tifftopnm: 0 0 0 0
diff --git a/test/stdin-pnm2.test b/test/stdin-pnm2.test
index ee97c992..7622c279 100755
--- a/test/stdin-pnm2.test
+++ b/test/stdin-pnm2.test
@@ -1,9 +1,16 @@
 #! /bin/sh
-# This script tests: pnmtofiasco fiascotopnm pnmtojbig jbigtopnm pnmtojpeg
-# This script tests: jpegtopnm pnmtopalm palmtopnm pnmtopng pngtopam pnmtops
-# This script tests: pstopnm pnmtorast rasttopnm pnmtorle rletopnm pnmtosgi
-# This script tests: sgitopnm pnmtosir sirtopnm pnmtoxwd xwdtopnm pnmtotiffcmyk
-# This script tests: tifftopnm
+# This script tests: pnmtofiasco fiascotopnm
+# This script tests: pnmtojbig jbigtopnm
+# This script tests: pnmtojpeg jpegtopnm
+# This script tests: pnmtopalm palmtopnm
+# This script tests: pnmtopng pngtopam
+# This script tests: pnmtops pstopnm
+# This script tests: pnmtorast rasttopnm
+# This script tests: pnmtorle rletopnm
+# This script tests: pnmtosgi sgitopnm
+# This script tests: pnmtosir sirtopnm
+# This script tests: pnmtoxwd xwdtopnm
+# This script tests: pnmtotiffcmyk tifftopnm
 # Also requires: pgmramp
 
 tmpdir=${tmpdir:-/tmp}
@@ -16,10 +23,13 @@ out4=${tmpdir}/out4
 pgmramp -diag 32 32 > ${test_pgm}
 
 echo "Test.  Should print (command): 0 0 0"
-echo "The following are exceptions: should print (command): 0 0 1"
-echo "pnmtops, pstopnm, pnmtorle, pnmtoxwd, pnmtotiffcmyk"
+echo "The following are exceptions: should print (command): 0 0 0 1"
+echo "pnmtops, pstopnm, pnmtoxwd, pnmtotiffcmyk"
 echo
 
+export NO_ADD_RLE_HISTORY=1
+# Suppress command-line sequence, execution time in pnmtorle header
+
 for fmt in  \
         fiasco \
         jbig \
@@ -42,7 +52,9 @@ for fmt in  \
   fi
 
   if [ ${fmt} = "png" ]
-    then testprog2=${fmt}"topam";
+    then testprog2="pngtopam";
+  elif [ ${fmt} = "ps" ]
+    then testprog2="pstopnm -stdout ";
   elif [ ${fmt} = "tiffcmyk" ]
     then testprog2="tifftopnm";
   else
@@ -51,26 +63,28 @@ for fmt in  \
 
   ${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} $?
+  echo ${testprog2}": "${status4} ${status5} ${status6} $?
+  rm ${out1} ${out3} ${out4}
 
-  rm ${out1} ${out2} ${out3} ${out4}
   done
 
 rm ${test_pgm}
 
 
 # pnmtofiasco  width, height must be even and at least 32
-# 
+#              use --progressmeter option to suppress progress meter
+#
 # pnmtojbig    input must be bilevel black-white or gray
 # pnmtops      input file name embedded in output
-# pnmtorle     input file name, creation time embedded in output
-#              file name blank when input is from stdin
 # pnmtotiffcmyk  input file name embedded in output
 #                "Standard input" if from stdin
 # pnmtoxwd     input file name embedded in output
diff --git a/test/stdin-ppm1.ok b/test/stdin-ppm1.ok
index d3a7ec5f..e84a31ea 100644
--- a/test/stdin-ppm1.ok
+++ b/test/stdin-ppm1.ok
@@ -1,15 +1,15 @@
-ppmchange: 0 0 0
-ppmcolormask -color=rgb:0/0/ff : 0 0 0
-ppmdim 0.5 : 0 0 0
-ppmdist: 0 0 0
-ppmdither: 0 0 0
-ppmflash 0.5 : 0 0 0
-ppmglobe 12 : 0 0 0
-ppmhist: 0 0 0
-ppmlabel: 0 0 0
-ppmntsc: 0 0 0
-ppmrelief: 0 0 0
-ppmshadow: 0 0 0
-ppmshift 2 -seed=1 : 0 0 0
-ppmspread 2 -randomseed=1 : 0 0 0
-ppmtv 0.5 : 0 0 0
+ppmchange: 0 0 0 0
+ppmcolormask -color=rgb:0/0/ff : 0 0 0 0
+ppmdim 0.5 : 0 0 0 0
+ppmdist: 0 0 0 0
+ppmdither: 0 0 0 0
+ppmflash 0.5 : 0 0 0 0
+ppmglobe 12 : 0 0 0 0
+ppmhist: 0 0 0 0
+ppmlabel: 0 0 0 0
+ppmntsc: 0 0 0 0
+ppmrelief: 0 0 0 0
+ppmshadow: 0 0 0 0
+ppmshift 2 -seed=1 : 0 0 0 0
+ppmspread 2 -randomseed=1 : 0 0 0 0
+ppmtv 0.5 : 0 0 0 0
diff --git a/test/stdin-ppm1.test b/test/stdin-ppm1.test
index 67d5da49..84614326 100755
--- a/test/stdin-ppm1.test
+++ b/test/stdin-ppm1.test
@@ -30,8 +30,9 @@ for testprog in  \
   do
   ${testprog} ${test_ppm} > ${out1};      status1=$?
   ${testprog} < ${test_ppm} > ${out2};    status2=$?
+  test -s ${out1};                        status3=$?
   cmp -s ${out1} ${out2}
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out2}
   done
 
diff --git a/test/stdin-ppm2.ok b/test/stdin-ppm2.ok
index 8e12a25f..e3fb4219 100644
--- a/test/stdin-ppm2.ok
+++ b/test/stdin-ppm2.ok
@@ -1,10 +1,11 @@
-ppmtoacad: 0 0 0
-ppmtoapplevol: 0 0 0
-ppmtoascii: 0 0 0
-ppmtolj: 0 0 0
-ppmtomitsu: 0 0 0
-ppmtopgm: 0 0 0
-ppmtopuzz: 0 0 0
-ppmtosixel: 0 0 0
-ppmtoterm: 0 0 0
-ppmtoicr: 0 0 0
+ppmtoacad: 0 0 0 0
+ppmtoapplevol: 0 0 0 0
+ppmtoascii: 0 0 0 0
+ppmtolj: 0 0 0 0
+ppmtomitsu: 0 0 0 0
+ppmtopgm: 0 0 0 0
+ppmtopuzz: 0 0 0 0
+ppmtosixel: 0 0 0 0
+ppmtoterm: 0 0 0 0
+ppmtoicr: 0 0 0 0
+ppmtoyuvsplit: 0 0 0 0
diff --git a/test/stdin-ppm2.test b/test/stdin-ppm2.test
index 63306b1d..81b3954e 100755
--- a/test/stdin-ppm2.test
+++ b/test/stdin-ppm2.test
@@ -1,6 +1,7 @@
 #! /bin/sh
 # This script tests: ppmtoacad ppmtoapplevol ppmtoascii ppmtolj ppmtomitsu
-# This script tests: ppmtopgm ppmtopuzz ppmtosixel ppmtoterm ppmtoicr
+# This script tests: ppmtopgm ppmtopuzz ppmtosixel ppmtoterm
+# This script tests: ppmtoicr ppmtoyuvsplit
 # Also requires: ppmpat
 
 tmpdir=${tmpdir:-/tmp}
@@ -25,8 +26,9 @@ for testprog in  \
   do
   ${testprog} ${test_ppm} > ${out1};      status1=$?
   ${testprog} < ${test_ppm} > ${out2};    status2=$?
+  test -s ${out1};                        status3=$?
   cmp -s ${out1} ${out2}
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out2}
   done
 
@@ -34,10 +36,29 @@ rm ${test_ppm}
 
 testprog=ppmtoicr
 
-  ${testprog} testgrid.pbm > ${out1};      status1=$?
-  ${testprog} < testgrid.pbm > ${out2};    status2=$?
+# File name embedded in output; "untitled" if no name
+
+  ${testprog} testgrid.pbm > ${out1};     status1=$?
+  ${testprog} < testgrid.pbm > ${out2};   status2=$?
+  test -s ${out1};                        status3=$?
   sed 's/untitled/testgrid.pbm/g' ${out2} | cmp -s ${out1} -
-  echo ${testprog}": "${status1} ${status2} $?
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
+  rm ${out1} ${out2}
+
+testprog=ppmtoyuvsplit
+
+# Produces three output files
+
+  ${testprog} ${tmpdir}/base testgrid.pbm;     status1=$?
+  cat ${tmpdir}/base.Y  ${tmpdir}/base.U  ${tmpdir}/base.V > ${out1}
+  rm ${tmpdir}/base.Y  ${tmpdir}/base.U  ${tmpdir}/base.V
+
+  ${testprog} ${tmpdir}/base < testgrid.pbm;   status2=$?
+  cat ${tmpdir}/base.Y  ${tmpdir}/base.U  ${tmpdir}/base.V > ${out2}
+  rm ${tmpdir}/base.Y  ${tmpdir}/base.U  ${tmpdir}/base.V
+  test -s ${out1};                             status3=$?
+  cmp -s ${out1} ${out2}
+  echo ${testprog}": "${status1} ${status2} ${status3} $?
   rm ${out1} ${out2}
 
 # Ppmtoppm input is from standard input
@@ -45,7 +66,3 @@ testprog=ppmtoicr
 # Ppmtoapplevol height must be 12
 # Ppmtoarbtxt needs body template file
 # Ppmtompeg parameter file must be given
-
-# Ppmtoicr file name embedded in output "untitled" if no name
-
-# Ppmtoyuvsplit produces three output files
diff --git a/test/stdin-ppm3.ok b/test/stdin-ppm3.ok
index 3dc56137..f7ba5623 100644
--- a/test/stdin-ppm3.ok
+++ b/test/stdin-ppm3.ok
@@ -1,20 +1,20 @@
-ppmtobmp: 0 0 0
-bmptopnm: 0 0 0
-ppmtoilbm: 0 0 0
-ilbmtoppm: 0 0 0
-ppmtoleaf: 0 0 0
-leaftoppm: 0 0 0
-ppmtoneo: 0 0 0
-neotoppm: 0 0 0
-ppmtopcx: 0 0 0
-pcxtoppm: 0 0 0
-ppmtopi1: 0 0 0
-pi1toppm: 0 0 0
-ppmtopict: 0 0 0
-picttoppm: 0 0 0
-ppmtopj: 0 0 0
-pjtoppm: 0 0 0
-ppmtospu: 0 0 0
-sputoppm: 0 0 0
-ppmtoxpm: 0 0 0
-xpmtoppm: 0 0 0
+ppmtobmp: 0 0 0 0
+bmptopnm: 0 0 0 0
+ppmtoilbm: 0 0 0 0
+ilbmtoppm: 0 0 0 0
+ppmtoleaf: 0 0 0 0
+leaftoppm: 0 0 0 0
+ppmtoneo: 0 0 0 0
+neotoppm: 0 0 0 0
+ppmtopcx: 0 0 0 0
+pcxtoppm: 0 0 0 0
+ppmtopi1: 0 0 0 0
+pi1toppm: 0 0 0 0
+ppmtopict: 0 0 0 0
+picttoppm: 0 0 0 0
+ppmtopj: 0 0 0 0
+pjtoppm: 0 0 0 0
+ppmtospu: 0 0 0 0
+sputoppm: 0 0 0 0
+ppmtoxpm: 0 0 0 0
+xpmtoppm: 0 0 0 0
diff --git a/test/stdin-ppm3.test b/test/stdin-ppm3.test
index 44334097..605b535b 100755
--- a/test/stdin-ppm3.test
+++ b/test/stdin-ppm3.test
@@ -1,23 +1,27 @@
 #! /bin/sh
-# This script tests: ppmtobmp bmptopnm ppmtoilbm ilbmtoppm ppmtoleaf leaftoppm
-# This script tests: ppmtoneo neotoppm ppmtopcx pcxtoppm ppmtopi1 pi1toppm
-# This script tests: ppmtopict picttoppm ppmtopj pjtoppm ppmtospu sputoppm
+# This script tests: ppmtobmp bmptopnm
+# This script tests: ppmtoilbm ilbmtoppm
+# This script tests: ppmtoleaf leaftoppm
+# This script tests: ppmtoneo neotoppm
+# This script tests: ppmtopcx pcxtoppm
+# This script tests: ppmtopi1 pi1toppm
+# This script tests: ppmtopict picttoppm
+# This script tests: ppmtopj pjtoppm
+# This script tests: ppmtospu sputoppm
 # This script tests: ppmtoxpm xpmtoppm
 # Also requires: ppmmake
 
 tmpdir=${tmpdir:-/tmp}
-test_ppm=${tmpdir}/test.ppm
-out1=${tmpdir}/out1
-out2=${tmpdir}/out2
-
-ppmmake -maxval 7 rgb:00/00/00 320 200 > ${test_ppm}
-
-tmpdir=${tmpdir:-/tmp}
+small_ppm=${tmpdir}/small.ppm
+large_ppm=${tmpdir}/large.ppm
 out1=${tmpdir}/out1
 out2=${tmpdir}/out2
 out3=${tmpdir}/out3
 out4=${tmpdir}/out4
 
+ppmmake -maxval 65535 rgb:00/00/00 8 3 > ${small_ppm}
+ppmmake -maxval 7 rgb:00/00/00 320 200 > ${large_ppm}
+
 for fmt in \
         bmp \
         ilbm \
@@ -36,36 +40,38 @@ for fmt in \
   else testprog2=${fmt}"toppm";
   fi
 
-  ${testprog1} ${test_ppm} > ${out1};      status1=$?
-  ${testprog1} < ${test_ppm} > ${out2};    status2=$?
+  if [ ${fmt} = "spu" ]
+    then test_ppm=${large_ppm};
+  else test_ppm=${small_ppm};
+  fi
+
+  ${testprog1} ${test_ppm} > ${out1};    status1=$?
+  ${testprog1} < ${test_ppm} > ${out2};  status2=$?
+  test -s ${out1};                       status3=$?
   if [ ${fmt} = "xpm" ]
     then
     sed -i '/^static char/s/static char .* = {/static char file/' \
 	    ${out1} ${out2};
-  fi 
+  fi
   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 ${out1};                     status6=$?
   cmp -s ${out3} ${out4}
-  echo ${testprog2}": "${status3} ${status4} $?
+  echo ${testprog2}": "${status4} ${status5} ${status6} $?
+  rm ${out1} ${out3} ${out4}
   done
 
-# asciitopgm
-# bmptopnm
-
-# winicontopam
-
-# spu width=320 height=200 fixed
-
-# eyuvtoppm width, height is mandatory
-# yuvtoppm width, height is mandatory
+rm ${small_ppm} ${large_ppm}
 
-# winicontoppm max size 255 255
+# ppmtopict width must be 8 or more
 
-# xpm maxval 15 or larger
+# ppmtospu sputoppm width=320 height=200 fixed
 
-# yuvsplit  splits output into three files
+# Eyuvtoppm, Yuvtoppm width, height are mandatory
 
-# ppmtowinicon winicontoppm legacy
+# Ppmtowinicon Winicontoppm legacy
+# Winicontoppm max size 255 255