diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-12-25 20:40:38 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-12-25 20:40:38 +0000 |
commit | ca4e5d91a96387bc270692f520b5a30c09856c16 (patch) | |
tree | 3b90d98f59c6d2e48c68aa07c4768d5a3642b0b1 /test/pamcrater.test | |
parent | e8724e9798d00fac3326f03ff9fdd616bdc8fce6 (diff) | |
download | netpbm-mirror-ca4e5d91a96387bc270692f520b5a30c09856c16.tar.gz netpbm-mirror-ca4e5d91a96387bc270692f520b5a30c09856c16.tar.xz netpbm-mirror-ca4e5d91a96387bc270692f520b5a30c09856c16.zip |
Update Advanced series to 10.69
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2351 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test/pamcrater.test')
-rwxr-xr-x | test/pamcrater.test | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/test/pamcrater.test b/test/pamcrater.test index 1d182208..cc937731 100755 --- a/test/pamcrater.test +++ b/test/pamcrater.test @@ -1,13 +1,21 @@ #! /bin/bash # This script tests: pamcrater pamshadedrelief -# Also requires: pamslice pamvalidate +# Also requires: pamstack pamvalidate pamcut pamflip alias pamcrater="${PBM_TESTPREFIX}pamcrater" - alias pamslice="${PBM_TESTPREFIX}pamshadedrelief" - alias pamslice="${PBM_BINPREFIX}pamslice" - alias pamvalidate="${PBM_TESTPREFIX}pamvalidate" + alias pamshadedrelief="${PBM_TESTPREFIX}pamshadedrelief" + alias pamstack="${PBM_BINPREFIX}pamstack" + alias pamvalidate="${PBM_BINPREFIX}pamvalidate" + alias pamcut="${PBM_BINPREFIX}pamcut" + alias pamflip="${PBM_BINPREFIX}pamflip" + shopt -s expand_aliases +# We use the undocumented --test and --radius options of pamcrater. +# pamcrater --test --radius=N +# The above draws a single crater of radius N. +# The resulting image should be symmetric. + tmpdir=${tmpdir:-/tmp} test_pam=${tmpdir}/test.pam @@ -29,11 +37,11 @@ pamstack ${test10_pam} ${test50_pam} ${test100_pam} ${test150_pam} | for i in 1 10 70 do - ( pamslice -row=$((128 + $i)) ${test_pam} | cksum && - pamslice -row=$((128 - $i)) ${test_pam} | cksum && - pamslice -col=$((128 + $i)) ${test_pam} | cksum && - pamslice -col=$((128 - $i)) ${test_pam} | cksum - ) | uniq -c | awk '{print $1}' + ( pamcut -top=$((128 + $i)) -height=1 ${test_pam} | cksum && + pamcut -top=$((128 - $i)) -height=1 ${test_pam} | cksum && + pamcut -left=$((128 + $i)) -width=1 ${test_pam} | pamflip -xy | cksum && + pamcut -left=$((128 - $i)) -width=1 ${test_pam} | pamflip -xy | cksum + ) | uniq -c | awk '{print $1}' done rm ${test_pam} ${test10_pam} ${test50_pam} @@ -42,12 +50,12 @@ rm ${test_pam} ${test10_pam} ${test50_pam} pamshadedrelief ${test100_pam} > ${testshaded_pam} -( pamslice -row=$((128 + 12)) ${testshaded_pam} | cksum && - pamslice -row=$((128 - 12)) ${testshaded_pam} | cksum && - pamslice -row=$((128 + 31)) ${testshaded_pam} | cksum && - pamslice -row=$((128 - 31)) ${testshaded_pam} | cksum && - pamslice -row=$((128 + 99)) ${testshaded_pam} | cksum && - pamslice -row=$((128 - 99)) ${testshaded_pam} | cksum +( pamcut -top=$((128 + 12)) -height=1 ${testshaded_pam} | cksum && + pamcut -top=$((128 - 12)) -height=1 ${testshaded_pam} | cksum && + pamcut -top=$((128 + 31)) -height=1 ${testshaded_pam} | cksum && + pamcut -top=$((128 - 31)) -height=1 ${testshaded_pam} | cksum && + pamcut -top=$((128 + 99)) -height=1 ${testshaded_pam} | cksum && + pamcut -top=$((128 - 99)) -height=1 ${testshaded_pam} | cksum ) | uniq -c | awk '{print $1}' rm ${testshaded_pam} ${test100_pam} |