diff options
Diffstat (limited to 'test/ppmtoapplevol.test')
-rwxr-xr-x | test/ppmtoapplevol.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/ppmtoapplevol.test b/test/ppmtoapplevol.test new file mode 100755 index 00000000..6b109251 --- /dev/null +++ b/test/ppmtoapplevol.test @@ -0,0 +1,30 @@ +#! /bin/sh +# This script tests: ppmtoapplevol +# Also requires: ppmmake pbmmake + +echo "Test: should print 1518149010 3065" +ppmmake rgb:0/0/0 255 12 | ppmtoapplevol | cksum + +echo "Invalid input." 1>&2 +echo "Error messages should appear below the line." 1>&2 +echo "-----------------------------------------------------------" 1>&2 + +echo "Test Invalid" + +tmpdir=${tmpdir:-/tmp} +test_out=${tmpdir}/test_out + +pbmmake 10 11 | ppmtoapplevol > ${test_out} || \ + echo -n "Expected failure 1" + test -s ${test_out}; echo " "$? + rm -f ${test_out} + +pbmmake 10 13 | ppmtoapplevol > ${test_out} || \ + echo -n "Expected failure 2" + test -s ${test_out}; echo " "$? + rm -f ${test_out} + +pbmmake 256 12 | ppmtoapplevol > ${test_out} || \ + echo -n "Expected failure 3" + test -s ${test_out}; echo " "$? + rm -f ${test_out} |