diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-12-28 19:53:34 +0000 |
commit | 5d16663331afd0bc2edaeb2e49042dc219ce9c2f (patch) | |
tree | 476fbb2ab4311d4bb6d65b250825e254a7a2c1ef /test/pnmpad-reportonly.test | |
parent | 42f0bf8e7f1ff88000a3584c265e6f1631662ec4 (diff) | |
download | netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.gz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.tar.xz netpbm-mirror-5d16663331afd0bc2edaeb2e49042dc219ce9c2f.zip |
promote Development to Advanced
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4827 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pnmpad-reportonly.test')
-rwxr-xr-x | test/pnmpad-reportonly.test | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/test/pnmpad-reportonly.test b/test/pnmpad-reportonly.test index ccd79e69..412cb8a2 100755 --- a/test/pnmpad-reportonly.test +++ b/test/pnmpad-reportonly.test @@ -125,5 +125,34 @@ for pad in "-t 4 -b 8 -h 112" \ pnmpad -reportonly ${pad} ${test_ppm} || echo "failure" done - +echo "Test Invalid" + +test_out=${tmpdir}/test_out +n=1 + +# define function +invcmd () { $1 > ${test_out} || \ + printf "Expected failure $n " + test -s ${test_out} && echo "unexpected output" || echo "(no output)" + rm -f ${test_out} + n=$(($n +1)); } + +echo 1>&2 +echo "Invalid command-line arguments." 1>&2 +echo "Error messages should appear below the line." 1>&2 +echo "-----------------------------------------------------------" 1>&2 + +invcmd "pnmpad -reportonly -l 1 -r 1 -w 100 testgrid.pbm" +invcmd "pnmpad -reportonly -t 1 -b 1 -h 100 testgrid.pbm" +invcmd "pnmpad -reportonly -black -white -l 1 testgrid.pbm" +invcmd "pnmpad -reportonly -color -l 1 testgrid.pbm" +invcmd "pnmpad -reportonly -color rgbi:0/0/0 -white -l 1 testgrid.pbm" +invcmd "pnmpad -reportonly -color rgbi:0/0/0 -extend-edge -l 1 testgrid.pbm" +invcmd "pnmpad -reportonly -color rgbi:0/0/0 -detect-background -l 1 testgrid.pbm" + +# echo "Test Invalid. Should print failure twice" +# +# pnmpad -reportonly -l 1 -r 1 -w 100 testgrid.pbm && echo "unexpected success" || echo "failure" +# pnmpad -reportonly -t 1 -b 1 -h 100 testgrid.pbm && echo "unexpected success" || echo "failure" +# rm ${test1_pbm} ${test2_pbm} ${test_pgm} ${test_ppm} |