diff options
Diffstat (limited to 'test/pgmhist.test')
-rwxr-xr-x | test/pgmhist.test | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/test/pgmhist.test b/test/pgmhist.test index ab3763fd..5c458a57 100755 --- a/test/pgmhist.test +++ b/test/pgmhist.test @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh # This script tests: pgmhist # Also requires: pgmramp @@ -26,21 +26,9 @@ pgmramp -lr 256 1 | pgmhist -machine -decile | \ echo "Test Invalid" -tmpdir=${tmpdir:-/tmp} -test_out=${tmpdir}/test_out +. ${srcdir}/test-invalid.inc -echo 1>&2 -echo "Invalid command-line argument combinations." 1>&2 -echo "Error messages should appear below the line." 1>&2 -echo "-----------------------------------------------------------" 1>&2 - -pgmhist -median -quartile testgrid.pbm > ${test_out} || \ - echo -n "Expected failure 1"; test -s ${test_out}; echo " "$? -pgmhist -median -decile testgrid.pbm > ${test_out} || \ - echo -n "Expected failure 2"; test -s ${test_out}; echo " "$? -pgmhist -quartile -decile testgrid.pbm > ${test_out} || \ - echo -n "Expected failure 3"; test -s ${test_out}; echo " "$? -pgmhist testimg.ppm > ${test_out} || \ - echo -n "Expected failure 4"; test -s ${test_out}; echo " "$? - -rm ${test_out} +invCmd "pgmhist -median -quartile testgrid.pbm" +invCmd "pgmhist -median -decile testgrid.pbm" +invCmd "pgmhist -quartile -decile testgrid.pbm" +invCmd "pgmhist testimg.ppm" |