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/pamenlarge-pbm.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/pamenlarge-pbm.test')
-rwxr-xr-x | test/pamenlarge-pbm.test | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/test/pamenlarge-pbm.test b/test/pamenlarge-pbm.test index 10c00ba0..bea740c6 100755 --- a/test/pamenlarge-pbm.test +++ b/test/pamenlarge-pbm.test @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh # This script tests: pamenlarge # Also requires: pbmmake pnmpad @@ -18,22 +18,26 @@ LC_ALL=C awk 'BEGIN { print "P4"; # header # Test 1. echo "test 1" -for xs in `seq 23` +for xs in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + # for xs in `seq 23` do - pamenlarge -xscale=$xs ${complete256_pbm} | cksum + pamenlarge -xscale=${xs} ${complete256_pbm} | cksum done # Test 2. echo "test 2" -for xs1 in `seq 15` +for xs1 in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 + # for xs1 in `seq 15` do - xs2=$((30-$xs1)) - pamenlarge -xscale=$xs1 ${complete256_pbm} | pamenlarge -xscale=$xs2 | cksum - if [ $xs1 != $xs2 ]; then - pamenlarge -xscale=$xs2 ${complete256_pbm} | pamenlarge -xscale=$xs1 | cksum + xs2=$((30-${xs1})) + pamenlarge -xscale=${xs1} ${complete256_pbm} | \ + pamenlarge -xscale=${xs2} | cksum + if [ ${xs1} != ${xs2} ]; then + pamenlarge -xscale=${xs2} ${complete256_pbm} | \ + pamenlarge -xscale=${xs1} | cksum fi - pamenlarge -xscale=$(($xs1 * $xs2)) ${complete256_pbm} | cksum + pamenlarge -xscale=$((${xs1} * ${xs2})) ${complete256_pbm} | cksum done rm ${complete256_pbm} @@ -43,19 +47,19 @@ echo "test 3" test3_pbm=${tmpdir}/test3.pbm -for width in `seq 16` +for width in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # for width in `seq 16` do pbmmake -g ${width} 1 | pnmpad -top=1 -white | \ pnmpad -bottom=1 -black > ${test3_pbm}.${width} done - for xscale in `seq 16` - do echo -n ${xscale} " " - for width in `seq 16` + for xscale in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # for xscale in `seq 16` + do printf "%d " ${xscale} + for width in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # for width in `seq 16` do pamenlarge -xscale=${xscale} ${test3_pbm}.${width} ; done | cksum # # unlike most other tests we take the cksum of a composite PBM file # done -rm ${test3_pbm}.[1-9] ${test3_pbm}.1[1-6] \ No newline at end of file +rm ${test3_pbm}.[1-9] ${test3_pbm}.1[0-6] |