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/pbmclean.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/pbmclean.test')
-rwxr-xr-x | test/pbmclean.test | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/test/pbmclean.test b/test/pbmclean.test index a8e469b1..5eba68e0 100755 --- a/test/pbmclean.test +++ b/test/pbmclean.test @@ -1,19 +1,53 @@ -#! /bin/bash +#! /bin/sh # This script tests: pbmclean -# Also requires: pbmmake pbmpage pnmmargin pnmpad +# Also requires: pbmmake pbmpage pbmtext pnmmargin pnmpad tmpdir=${tmpdir:-/tmp} test_pbm=${tmpdir}/test.pbm +sheet_pbm=${tmpdir}/sheet.pbm + +echo "Test 1" pbmmake -g 3 3 | pnmmargin -black 2 > ${test_pbm} for n in 1 2 3 4 5 6 7 8 -do -pbmclean -min=$n -black -plain ${test_pbm} -done + do + pbmclean -min=${n} -black -plain ${test_pbm} + done rm ${test_pbm} + +echo "Test 2" + # Should print 760076056 4210813 pbmpage 1 | pbmclean -black | cksum + + +echo "Test 3" + +pbmtext -dump-sheet > ${sheet_pbm} +for n in 1 2 3 4 5 6 7 8 9 10 + do + pbmclean -min=${n} -extended ${sheet_pbm} | cksum + done + +rm ${sheet_pbm} + +echo "Test Invalid" + +test_out=${tmpdir}/test_out + +echo 1>&2 +echo "Invalid command-line argument combination." 1>&2 +echo "An error message should appear below the line." 1>&2 +echo "-----------------------------------------------------------" 1>&2 + +# overspecification +pbmclean -black -white -min=1 -extended testgrid.pbm > ${test_out} || \ + printf "Expected failure 1" + test -s ${test_out}; echo " "$? + rm -f ${test_out} + +# note that without -extended the above is valid. |