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/enlarge-reduce-roundtrip.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/enlarge-reduce-roundtrip.test')
-rwxr-xr-x | test/enlarge-reduce-roundtrip.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/enlarge-reduce-roundtrip.test b/test/enlarge-reduce-roundtrip.test new file mode 100755 index 00000000..54b52c60 --- /dev/null +++ b/test/enlarge-reduce-roundtrip.test @@ -0,0 +1,34 @@ +#! /bin/bash +# This script tests: pamenlarge pbmpscale pbmreduce +# Also requires: pbmtext + +tmpdir=${tmpdir:-/tmp} +xanadu_pbm=${tmpdir}/xanadu.pbm + +echo "In Xanadu did Kubla khan" | pbmtext > ${xanadu_pbm} + +# Should print 2364818683 590 + +cat ${xanadu_pbm} | cksum + +# Should print 2364818683 590 eight times + +for scale in 2 4 6 7 + do + for flag in "-fs -randomseed=0" "-threshold -v 0.4" + do + pamenlarge ${scale} ${xanadu_pbm} | pbmreduce ${flag} ${scale} | cksum + done + done + +# Should print 2364818683 590 eight times + +for scale in 5 7 9 11 + do + for flag in "-fs -randomseed=0" "-threshold" + do + pbmpscale ${scale} ${xanadu_pbm} | pbmreduce ${flag} ${scale} | cksum + done + done + +rm ${xanadu_pbm} |