diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-06-28 17:29:32 +0000 |
commit | 23ce26f64c34e30951ad9ade2151552ed77e7357 (patch) | |
tree | d73b31a0c2f7c7be4a69f8a8e84e00dd39c432b5 /test/pamtable.test | |
parent | 1b6e51a266008348ad93ed8b6ac9ec91b5024fea (diff) | |
download | netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.gz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.tar.xz netpbm-mirror-23ce26f64c34e30951ad9ade2151552ed77e7357.zip |
promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@4558 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pamtable.test')
-rwxr-xr-x | test/pamtable.test | 62 |
1 files changed, 52 insertions, 10 deletions
diff --git a/test/pamtable.test b/test/pamtable.test index 5c66b7ae..e948ad0c 100755 --- a/test/pamtable.test +++ b/test/pamtable.test @@ -1,20 +1,62 @@ -#! /bin/bash +#! /bin/sh # This script tests: pamtable -# Also requires: pamgradient pamseq pamdepth +# Also requires: pamseq pamrestack pamdepth pbmmake ppmrainbow +echo "Test 1" pamtable testgrid.pbm + echo +echo "Test 2" pamseq 3 2 -tupletype=RGB | pamtable + echo +echo "Test 3" pamseq 4 1 -tupletype=RGBA | pamtable + +echo +echo "Test 4" +pbmmake -gray 5 1 | pamtable -tuple + +echo +echo "Test 5" +pbmmake -gray 1 10 | pamtable -tuple + +echo +echo "Test 6" +pamseq 3 3 -tupletype=RGB | pamrestack -width=3 | pamtable -tuple + +echo +echo "Test 7" +pamseq 2 255 -max=50,255 -step=10,17 | pamrestack -width=8 | \ + pamtable -hex + echo +echo "Test 8" for maxval in 9 10 9999 10000 65535 - do pbmmake -g 2 2 | pamdepth $maxval | pamtable - echo - ppmrainbow -width=3 -height=2 -norepeat black white | \ - pamdepth $maxval | pamtable - echo - ppmrainbow -width=4 -height=2 -norepeat red blue green | \ - pamdepth $maxval | pamtable - echo + do + pbmmake -g 2 2 | pamdepth ${maxval} | pamtable + echo + ppmrainbow -width=3 -height=2 -norepeat black white | \ + pamdepth ${maxval} | pamtable + echo + ppmrainbow -width=4 -height=2 -norepeat red blue green | \ + pamdepth ${maxval} | pamtable + echo done + +echo "Test Invalid" + +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 + +echo "Should print: Expected failure 1" + +pamseq -tupletype="void" 1 1 | pamtable -tuple -hex > \ + ${test_out} || \ + printf "Expected failure" + test -s ${test_out}; echo " "$? + rm -f ${test_out} |