diff options
Diffstat (limited to 'test/pgmramp.test')
-rwxr-xr-x | test/pgmramp.test | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/test/pgmramp.test b/test/pgmramp.test index 3ec73749..84fe02ca 100755 --- a/test/pgmramp.test +++ b/test/pgmramp.test @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh # This script tests: pgmramp # Also requires: @@ -21,24 +21,16 @@ pgmramp -diagonal -maxval=510 256 256 | cksum echo "Test Invalid" -echo 1>&2 -echo "Invalid command-line argument combinations." 1>&2 -echo "Error messages should appear below the line." 1>&2 -echo "-----------------------------------------------------------" 1>&2 +. ${srcdir}/test-invalid.inc -tmpdir=${tmpdir:-/tmp} -test_out=${tmpdir}/test_out for combination in "-lr -tb" "-lr -rectangle" "-rectangle -ellipse" -do pgmramp $combination 10 10 > ${test_out} || \ - echo -n "Expected failure: $combination" ; test -s ${test_out}; echo " "$? -done + do + invCmd "pgmramp ${combination} 10 10" + done -pgmramp -lr 1 > ${test_out} || \ - echo -n "Expected failure: insufficient parameters"; \ - test -s ${test_out}; echo " "$? -pgmramp -tb 1 1 1 > ${test_out} || \ - echo -n "Expected failure: excessive parameters"; \ - test -s ${test_out}; echo " "$? +invCmd "pgmramp -lr 10 0" +invCmd "pgmramp -lr 0 10" +invCmd "pgmramp -lr 1" +invCmd "pgmramp -tb 1 1 1" -rm ${test_out} |