diff options
Diffstat (limited to 'test/ppmwheel.test')
-rwxr-xr-x | test/ppmwheel.test | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/test/ppmwheel.test b/test/ppmwheel.test index f528e209..c6583f97 100755 --- a/test/ppmwheel.test +++ b/test/ppmwheel.test @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh # This script tests: ppmwheel # Also requires: @@ -6,6 +6,8 @@ # For values 6 and above, x86(-32) and x86-64 produce different output. # SSE floating-point math is the probable cause. +echo "Test 1." + for i in 4 5 do ppmwheel $i | cksum @@ -108,3 +110,38 @@ done # 98: 4086203619 28825 1961862620 28825 # 99: 3656777902 29416 2475351252 29416 # 100: 2246720411 30015 4055518595 30015 + +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 + +ppmwheel 10 -huevalue -huesaturation > ${test_out} || \ + printf "Expected failure 1" + test -s ${test_out}; echo " "$? + rm -f ${test_out} + +ppmwheel 0 > ${test_out} || \ + printf "Expected failure 2" + test -s ${test_out}; echo " "$? + rm -f ${test_out} + +ppmwheel 3 > ${test_out} || \ + printf "Expected failure 3" + test -s ${test_out}; echo " "$? + rm -f ${test_out} + +ppmwheel > ${test_out} || \ + printf "Expected failure 4" + test -s ${test_out}; echo " "$? + rm -f ${test_out} + +ppmwheel 10 10 > ${test_out} || \ + printf "Expected failure 5" + test -s ${test_out}; echo " "$? + rm -f ${test_out} |