about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-03-02 16:08:22 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-03-02 16:08:22 +0000
commit5e0c642616dc0b52ed41224b667f63e4261f2c08 (patch)
tree3fa5a1508ebab2abfc2f62e2277b4cc4c2cb5654 /test
parent0955c115a57dd47a518a784d119407b7d6c0b9d3 (diff)
downloadnetpbm-mirror-5e0c642616dc0b52ed41224b667f63e4261f2c08.tar.gz
netpbm-mirror-5e0c642616dc0b52ed41224b667f63e4261f2c08.tar.xz
netpbm-mirror-5e0c642616dc0b52ed41224b667f63e4261f2c08.zip
Pamenlarge test improvements
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3554 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rw-r--r--test/pamenlarge-pbm.ok130
-rwxr-xr-xtest/pamenlarge-pbm.test10
2 files changed, 64 insertions, 76 deletions
diff --git a/test/pamenlarge-pbm.ok b/test/pamenlarge-pbm.ok
index e9ebd78d..dcc2da97 100644
--- a/test/pamenlarge-pbm.ok
+++ b/test/pamenlarge-pbm.ok
@@ -23,80 +23,64 @@ test 1
 3831078134 5643
 1848221383 5899
 test 2
-2848735506 5131
-2848735506 5131
-2848735506 5131
-1983020436 9739
-1983020436 9739
-1983020436 9739
-732326811 13835
-732326811 13835
-732326811 13835
-1072342346 17419
-1072342346 17419
-1072342346 17419
-981152079 20491
-981152079 20491
-981152079 20491
-3766223324 23051
-3766223324 23051
-3766223324 23051
-209139519 25099
-209139519 25099
-209139519 25099
-141252239 26635
-141252239 26635
+2525154083 7435
+2525154083 7435
+2525154083 7435
+1983944984 14347
+1983944984 14347
+1983944984 14347
+2319780757 20747
+2319780757 20747
+2319780757 20747
 141252239 26635
-1241842059 27659
-1241842059 27659
-1241842059 27659
-4173230574 28171
-4173230574 28171
-4173230574 28171
-4173230574 28171
-4173230574 28171
-4173230574 28171
-1241842059 27659
-1241842059 27659
-1241842059 27659
 141252239 26635
 141252239 26635
-141252239 26635
-209139519 25099
-209139519 25099
-209139519 25099
-3766223324 23051
-3766223324 23051
-3766223324 23051
-981152079 20491
-981152079 20491
-981152079 20491
-1072342346 17419
-1072342346 17419
-1072342346 17419
-732326811 13835
-732326811 13835
-732326811 13835
-1983020436 9739
-1983020436 9739
-1983020436 9739
-2848735506 5131
-2848735506 5131
-2848735506 5131
+2074950535 32012
+2074950535 32012
+2074950535 32012
+2906360922 36876
+2906360922 36876
+2906360922 36876
+1320535490 41228
+1320535490 41228
+1320535490 41228
+1972046289 45068
+1972046289 45068
+1972046289 45068
+2203980644 48396
+2203980644 48396
+2203980644 48396
+2060433297 51212
+2060433297 51212
+2060433297 51212
+912377848 53516
+912377848 53516
+912377848 53516
+3346570289 55308
+3346570289 55308
+3346570289 55308
+1851051473 56588
+1851051473 56588
+1851051473 56588
+1940412039 57356
+1940412039 57356
+1940412039 57356
+2001859943 57612
+2001859943 57612
 test 3
-1  2285363768 191
-2  1302033680 244
-3  75147399 299
-4  4190327792 342
-5  56011966 403
-6  2787548071 451
-7  118558957 507
-8  3846542782 539
-9  2953363021 612
-10  3114645435 663
-11  2545145402 717
-12  3028643071 760
-13  678005060 821
-14  1666212289 869
-15  3907271797 924
-16  2957561834 954
+1  2764166846 191
+2  971905193 244
+3  6339889 299
+4  3973389476 342
+5  530215023 403
+6  2124428491 451
+7  2999665126 507
+8  4073302787 539
+9  3877636246 612
+10  1762263341 663
+11  3034611851 717
+12  3339857159 760
+13  119666911 821
+14  4197425209 869
+15  1169924963 924
+16  1845126791 954
diff --git a/test/pamenlarge-pbm.test b/test/pamenlarge-pbm.test
index a8096f11..10c00ba0 100755
--- a/test/pamenlarge-pbm.test
+++ b/test/pamenlarge-pbm.test
@@ -13,6 +13,8 @@ LC_ALL=C awk 'BEGIN { print "P4";         # header
                       for (i=0;i<256;++i) # raster
                            printf("%c",i) }' > ${complete256_pbm}
 
+# xscale factor should be tested to at least 21 (=13+8)
+
 # Test 1.
 echo "test 1"
  
@@ -24,11 +26,13 @@ for xs in `seq 23`
 # Test 2.
 echo "test 2"
 
-for xs1 in `seq 20`
+for xs1 in `seq 15`
   do
-  xs2=$((21-$xs1))
+  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
   done
 
@@ -41,7 +45,7 @@ test3_pbm=${tmpdir}/test3.pbm
 
 for width in `seq 16`
   do
-  pbmmake ${width} 1 | pnmpad -top=1 -white | \
+  pbmmake -g ${width} 1 | pnmpad -top=1 -white | \
       pnmpad -bottom=1 -black > ${test3_pbm}.${width}
   done