about summary refs log tree commit diff
path: root/test/pbmmake.test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-09-22 15:10:06 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-09-22 15:10:06 +0000
commit270c5f0ef4747ad5a1a418659213514be6cd1bda (patch)
treee09259abd808ac7e9a4c2494e1ccefa0d08ef991 /test/pbmmake.test
parent3e6bd495a661107cabb91df9e693151addae3f20 (diff)
downloadnetpbm-mirror-270c5f0ef4747ad5a1a418659213514be6cd1bda.tar.gz
netpbm-mirror-270c5f0ef4747ad5a1a418659213514be6cd1bda.tar.xz
netpbm-mirror-270c5f0ef4747ad5a1a418659213514be6cd1bda.zip
Miscellaneous test updates
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3686 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pbmmake.test')
-rwxr-xr-xtest/pbmmake.test38
1 files changed, 25 insertions, 13 deletions
diff --git a/test/pbmmake.test b/test/pbmmake.test
index eb4be6ea..3f815617 100755
--- a/test/pbmmake.test
+++ b/test/pbmmake.test
@@ -2,7 +2,7 @@
 # This script tests: pbmmake
 # Also requires:
 
-echo "Test 1."
+echo "Test 1"
 
 for i in `seq 1 8`
 do
@@ -10,10 +10,10 @@ for color in -white -black -gray
 do
 pbmmake -plain $color $i $i | tr -d '\n'; echo
 done
+done
 
-echo "Test 2."
+echo "Test 2"
 
-done
 for i in `seq 8 5 98`
 do
  ( pbmmake -w $i $i ;
@@ -21,19 +21,31 @@ do
   pbmmake  -g $i $i ) | cksum
 done
 
-echo "Test 3."
+echo "Test Invalid"
 
 echo 1>&2
 echo "Invalid command-line argument combinations." 1>&2
 echo "Error messages should appear below the line." 1>&2
 echo "-----------------------------------------------------------" 1>&2
 
-pbmmake -b -w -plain 1 1 || echo "Expected error 1"
-pbmmake -b -g -plain 1 1 || echo "Expected error 2"
-pbmmake -white -gray -plain 1 1 || echo "Expected error 3"
-pbmmake -white -plain   || echo "Expected error 4"
-pbmmake -white -plain 1 || echo "Expected error 5"
-pbmmake -white -plain 1 0 || echo "Expected error 6"
-pbmmake -white -plain 0 1 || echo "Expected error 7"
-pbmmake -white -plain 1 1 1 || echo "Expected error 8"
-pbmmake -plain 1 1 ||  echo "Expected error 9"
+tmpdir=${tmpdir:-/tmp}
+test_out=${tmpdir}/test_out
+
+pbmmake -b -w -plain 1 1 > ${test_out} || \
+   echo -n "Expected failure 1"; test -s ${test_out}; echo " "$?
+pbmmake -b -g -plain 1 1 > ${test_out} || \
+   echo -n "Expected failure 2"; test -s ${test_out}; echo " "$?
+pbmmake -white -gray -plain 1 1 > ${test_out} || \
+   echo -n "Expected failure 3"; test -s ${test_out}; echo " "$?
+pbmmake -white -plain   > ${test_out} || \
+   echo -n "Expected failure 4"; test -s ${test_out}; echo " "$?
+pbmmake -white -plain 1 > ${test_out} || \
+   echo -n "Expected failure 5"; test -s ${test_out}; echo " "$?
+pbmmake -white -plain 1 0 > ${test_out} || \
+   echo -n "Expected failure 6"; test -s ${test_out}; echo " "$?
+pbmmake -white -plain 0 1 > ${test_out} || \
+   echo -n "Expected failure 7"; test -s ${test_out}; echo " "$?
+pbmmake -white -plain 1 1 1 > ${test_out} || \
+   echo -n "Expected failure 8"; test -s ${test_out}; echo " "$?
+
+rm ${test_out}