about summary refs log tree commit diff
path: root/test/stdin-pam2.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/stdin-pam2.test')
-rwxr-xr-xtest/stdin-pam2.test19
1 files changed, 13 insertions, 6 deletions
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}