diff options
Diffstat (limited to 'test/pnmcolormap.test')
-rwxr-xr-x | test/pnmcolormap.test | 51 |
1 files changed, 9 insertions, 42 deletions
diff --git a/test/pnmcolormap.test b/test/pnmcolormap.test index b34a0360..953dece3 100755 --- a/test/pnmcolormap.test +++ b/test/pnmcolormap.test @@ -32,49 +32,16 @@ pnmcolormap -center 64 testimg.ppm | cmp -s ${map} - && echo ok || echo bad pnmcolormap -spreadbrightness 64 testimg.ppm | cmp -s ${map} - && echo ok || echo bad pnmcolormap -splitpixelct 64 testimg.ppm | cmp -s ${map} - && echo ok || echo bad rm ${map} + echo echo "Test Invalid." -echo 1>&2 -echo "Invalid command-line arguments." 1>&2 -echo "Error messages should appear below the line." 1>&2 -echo "-----------------------------------------------------------" 1>&2 - -tmpdir=${tmpdir:-/tmp} -test_out=${tmpdir}/test_out - -pnmcolormap 0 testimg.ppm > ${test_out} || \ - printf "Expected failure 1 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pnmcolormap -1 testimg.ppm > ${test_out} || \ - printf "Expected failure 2 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pnmcolormap 0.1 testimg.ppm > ${test_out} || \ - printf "Expected failure 3 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pnmcolormap -center -meancolor 16 testimg.ppm > ${test_out} || \ - printf "Expected failure 4 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pnmcolormap -center -meanpixel 16 testimg.ppm > ${test_out} || \ - printf "Expected failure 5 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} - -pnmcolormap -meancolor -meanpixel 16 testimg.ppm > ${test_out} || \ - printf "Expected failure 6 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} +. ${srcdir}/test-invalid.inc -pnmcolormap -spreadbrightness -spreadluminosity 16 \ - testimg.ppm > ${test_out} || \ - printf "Expected failure 7 " - test -s ${test_out} && echo "unexpected output" || echo "(no output)" - rm -f ${test_out} +invCmd "pnmcolormap 0 testimg.ppm " +invCmd "pnmcolormap -1 testimg.ppm " +invCmd "pnmcolormap 0.1 testimg.ppm" +invCmd "pnmcolormap -center -meancolor 16 testimg.ppm " +invCmd "pnmcolormap -center -meanpixel 16 testimg.ppm " +invCmd "pnmcolormap -meancolor -meanpixel 16 testimg.ppm" +invCmd "pnmcolormap -spreadbrightness -spreadluminosity 16 testimg.ppm" |