diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2019-06-28 23:45:11 +0000 |
commit | cdf6e0151411d887fef61245cb303ef190b29335 (patch) | |
tree | 678c2212e125e66e0a868773e2b4ec460794da4e /test/pnmquantall.test | |
parent | de1311e820dc892f1a3c5c9ae70dbc56868030d8 (diff) | |
download | netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.gz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.tar.xz netpbm-mirror-cdf6e0151411d887fef61245cb303ef190b29335.zip |
Promote Advanced to Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@3641 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pnmquantall.test')
-rwxr-xr-x | test/pnmquantall.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/pnmquantall.test b/test/pnmquantall.test new file mode 100755 index 00000000..cd01bb8d --- /dev/null +++ b/test/pnmquantall.test @@ -0,0 +1,27 @@ +#! /bin/bash +# This script tests: pnmquantall +# Also requires: ppmtorgb3 pgmhist + +tmpdir=${tmpdir:-/tmp} +test_ppm=${tmpdir}/testimg.ppm + +cp testimg.ppm ${tmpdir} && +ppmtorgb3 ${test_ppm} + +test_red=${tmpdir}/testimg.red +test_grn=${tmpdir}/testimg.grn +test_blu=${tmpdir}/testimg.blu + +pnmquantall 20 ${test_red} ${test_grn} ${test_blu} + +for i in ${test_red} ${test_grn} ${test_blu} +do +cat $i | cksum +done + +# Should print 1 + +pnmcat ${test_red} ${test_grn} ${test_blu} -tb | \ + pgmhist -m | awk '$2>0 {s++}; END { print (s<=20) }' + +rm ${test_red} ${test_grn} ${test_blu} ${test_ppm} \ No newline at end of file |