about summary refs log tree commit diff
path: root/test/ppmbrighten.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/ppmbrighten.test')
-rwxr-xr-xtest/ppmbrighten.test22
1 files changed, 7 insertions, 15 deletions
diff --git a/test/ppmbrighten.test b/test/ppmbrighten.test
index 40fe08f6..8ae1d744 100755
--- a/test/ppmbrighten.test
+++ b/test/ppmbrighten.test
@@ -1,6 +1,6 @@
-#! /bin/bash
+#! /bin/sh
 # This script tests: ppmbrighten
-# Also requires: pnmnorm pambrighten pamsumm 
+# Also requires: pnmnorm pambrighten pamsumm
 
 # Failure message
 ## Ppmbrighten is sensitive to subtle differences in floating point math.
@@ -20,19 +20,11 @@ echo "Test 3: Should print 1"
 ppmbrighten -v 100 -normalize testimg.ppm | pamsumm --mean | \
  awk '{print ($NF > 132.0) && ($NF < 132.2)}'
 
-echo "Invalid command-line argument combinations." 1>&2
-echo "Error messages should appear below the line." 1>&2
-echo "-----------------------------------------------------------" 1>&2
 
-echo "Test Error: Should print 1 four times"
+echo "Test Invalid"
 
-output_ppm=${tmpdir}/output.ppm
+. ${srcdir}/test-invalid.inc
+
+invCmd "pambrighten -v -120 testimg.ppm"
+invCmd "pambrighten -s -120 testimg.ppm"
 
-pambrighten -v -120 testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?
-pambrighten -s -120 testimg.ppm > ${output_ppm}
-echo $?
-test -s ${output_ppm}
-echo $?