diff options
Diffstat (limited to 'test/pamsumm.test')
-rwxr-xr-x | test/pamsumm.test | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/test/pamsumm.test b/test/pamsumm.test index 6fef5972..eb41ee36 100755 --- a/test/pamsumm.test +++ b/test/pamsumm.test @@ -26,30 +26,9 @@ for type in -sum -min -max -mean echo "Test Invalid" -tmpdir=${tmpdir:-/tmp} -test_out=${tmpdir}/test_out - -echo 1>&2 -echo "Invalid command-line argument combinations." 1>&2 -echo "Error messages should appear below the line." 1>&2 -echo "-----------------------------------------------------------" 1>&2 - -pamsumm -sum -min testimg.ppm > ${test_out} || \ - printf "Expected failure 1 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pamsumm -sum -max testimg.ppm > ${test_out} || \ - printf "Expected failure 2 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pamsumm -mean -max testimg.ppm > ${test_out} || \ - printf "Expected failure 3 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pamsumm testimg.ppm > ${test_out} || \ - printf "Expected failure 4 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} +. ${srcdir}/test-invalid.inc + +invCmd "pamsumm -sum -min testimg.ppm" +invCmd "pamsumm -sum -max testimg.ppm" +invCmd "pamsumm -mean -max testimg.ppm" +invCmd "pamsumm testimg.ppm" |