about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-07-01 02:59:43 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-07-01 02:59:43 +0000
commitab4ae9c9833ba4c088857c27290519fe20fc19d0 (patch)
treeee8a2a552e3372ec9659b2ec2dd198e2efdd4e4b
parent9397237df015c17160c500d8c7b16b66c1ba4c1d (diff)
downloadnetpbm-mirror-ab4ae9c9833ba4c088857c27290519fe20fc19d0.tar.gz
netpbm-mirror-ab4ae9c9833ba4c088857c27290519fe20fc19d0.tar.xz
netpbm-mirror-ab4ae9c9833ba4c088857c27290519fe20fc19d0.zip
Add test for pamtopng, new tests sunicon-roundtrip, pbm-misc-converter
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2596 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--test/Test-Order4
-rw-r--r--test/all-in-place.ok2
-rwxr-xr-xtest/all-in-place.test2
-rw-r--r--test/legacy-names.ok1
-rwxr-xr-xtest/legacy-names.test1
-rw-r--r--test/pbm-misc-converters.ok27
-rwxr-xr-xtest/pbm-misc-converters.test40
-rwxr-xr-xtest/png-roundtrip.test3
-rw-r--r--test/png-roundtrip2.ok4
-rwxr-xr-xtest/png-roundtrip2.test22
-rw-r--r--test/sunicon-roundtrip.ok1
-rwxr-xr-xtest/sunicon-roundtrip.test8
12 files changed, 113 insertions, 2 deletions
diff --git a/test/Test-Order b/test/Test-Order
index d21b9e8a..3e29545a 100644
--- a/test/Test-Order
+++ b/test/Test-Order
@@ -83,6 +83,8 @@ pbmtog3.test
 411toppm.test
 eyuvtoppm.test
 
+pbm-misc-converters.test
+
 # Miscellaneous utility tests
 
 ppmdfont.test
@@ -129,11 +131,13 @@ pfm-roundtrip.test
 pi3-roundtrip.test
 pict-roundtrip.test
 png-roundtrip.test
+png-roundtrip2.test
 ps-roundtrip.test
 ps-alt-roundtrip.test
 sgi-roundtrip.test
 sbig-roundtrip.test
 st4-roundtrip.test
+sunicon-roundtrip.test
 sunrast-roundtrip.test
 targa-roundtrip.test
 tiff-roundtrip.test
diff --git a/test/all-in-place.ok b/test/all-in-place.ok
index c58eb024..61a9ee68 100644
--- a/test/all-in-place.ok
+++ b/test/all-in-place.ok
@@ -66,7 +66,6 @@ pamperspective: ok
 pampick: ok
 pampop9: ok
 pamrecolor: ok
-pamrgbatopng: ok
 pamrubber: ok
 pamscale: ok
 pamseq: ok
@@ -95,6 +94,7 @@ pamtooctaveimg: ok
 pamtopam: ok
 pamtopdbimg: ok
 pamtopfm: ok
+pamtopng: ok
 pamtopnm: ok
 pamtosrf: ok
 pamtosvg: ok
diff --git a/test/all-in-place.test b/test/all-in-place.test
index 79459f7a..e7cf3ed0 100755
--- a/test/all-in-place.test
+++ b/test/all-in-place.test
@@ -105,7 +105,6 @@ ordinary_testprogs="\
   pampick \
   pampop9 \
   pamrecolor \
-  pamrgbatopng \
   pamrubber \
   pamscale \
   pamseq \
@@ -134,6 +133,7 @@ ordinary_testprogs="\
   pamtopam \
   pamtopdbimg \
   pamtopfm \
+  pamtopng \
   pamtopnm \
   pamtosrf \
   pamtosvg \
diff --git a/test/legacy-names.ok b/test/legacy-names.ok
index 57343afa..9676639b 100644
--- a/test/legacy-names.ok
+++ b/test/legacy-names.ok
@@ -2,6 +2,7 @@ bmptoppm: ok
 gemtopbm: ok
 icontopbm: ok
 pamfixtrunc: ok
+pamrgbatopng: ok
 pbmtoicon: ok
 pgmedge: ok
 pgmnorm: ok
diff --git a/test/legacy-names.test b/test/legacy-names.test
index 9940f207..df40e62d 100755
--- a/test/legacy-names.test
+++ b/test/legacy-names.test
@@ -53,6 +53,7 @@ ordinary_testprogs="\
   gemtopbm \
   icontopbm \
   pamfixtrunc \
+  pamrgbatopng \
   pbmtoicon \
   pgmedge \
   pgmnorm \
diff --git a/test/pbm-misc-converters.ok b/test/pbm-misc-converters.ok
new file mode 100644
index 00000000..a137102f
--- /dev/null
+++ b/test/pbm-misc-converters.ok
@@ -0,0 +1,27 @@
+1638343024 43
+2141128209 77
+2542756600 120
+3102495729 32
+2414506375 47
+3241517214 145
+1454090165 46
+1436169407 46
+1454090165 46
+2912484298 46
+3576177652 52
+1478164284 52
+3213223606 141
+3213223606 141
+3213223606 141
+1463148415 108
+203901789 30
+3732005859 92
+2459345477 86
+424535246 92
+609530223 252
+4195053594 248
+2602382240 43
+129620534 361
+2256096096 80
+1349121911 149
+3955750161 284701
diff --git a/test/pbm-misc-converters.test b/test/pbm-misc-converters.test
new file mode 100755
index 00000000..aa71489b
--- /dev/null
+++ b/test/pbm-misc-converters.test
@@ -0,0 +1,40 @@
+#! /bin/bash
+# This script tests: pbmto10x pbmto4425 pbmtoascii pbmtobbnbg
+# This script tests: pbmtodjvurle pbmtoepson pbmtogo pbmtoibm23xx
+# This script tests: pbmtolj pbmtoln03 pbmtomatrixorbital pbmtonokia
+# This script tests: pbmtoplot pbmtoptx pbmtozinc
+# Also requires: pbmpage
+
+# Note: one-way test.
+# These converters do not have counterparts that work in the opposite
+# direction.  We check whether the output is unchanged from older
+# versions.
+
+pbmto10x             testgrid.pbm | cksum
+pbmto4425            testgrid.pbm | cksum
+pbmtoascii           testgrid.pbm | cksum
+pbmtoascii -2x4      testgrid.pbm | cksum
+pbmtobbnbg         < testgrid.pbm | cksum
+pbmtodjvurle         testgrid.pbm | cksum
+pbmtoepson           testgrid.pbm | cksum
+pbmtoepson -protocol=escp   testgrid.pbm | cksum
+pbmtoepson -protocol=escp9  testgrid.pbm | cksum
+pbmtoepson -nonadjacent     testgrid.pbm | cksum
+pbmtogo              testgrid.pbm | cksum
+pbmtoibm23xx -xres=60 -yres=60 testgrid.pbm | cksum
+pbmtolj              testgrid.pbm | cksum
+pbmtolj  -packbits   testgrid.pbm | cksum
+pbmtolj  -compress   testgrid.pbm | cksum
+pbmtoln03            testgrid.pbm | cksum
+pbmtomatrixorbital < testgrid.pbm | cksum
+pbmtonokia -fmt HEX_NOL testgrid.pbm | cksum
+pbmtonokia -fmt HEX_NGG testgrid.pbm | cksum
+pbmtonokia -fmt HEX_NPM testgrid.pbm | cksum
+pbmtonokia -fmt NOL  testgrid.pbm | cksum
+pbmtonokia -fmt NGG  testgrid.pbm | cksum
+pbmtonokia -fmt NPM  testgrid.pbm | cksum
+pbmtoplot            testgrid.pbm | cksum
+pbmtoptx             testgrid.pbm | cksum
+pbmtozinc            testgrid.pbm | cksum
+
+(pbmpage 1; pbmpage 2; pbmpage 3) | pbmtoppa | cksum
diff --git a/test/png-roundtrip.test b/test/png-roundtrip.test
index e70f6765..7e7c4a9b 100755
--- a/test/png-roundtrip.test
+++ b/test/png-roundtrip.test
@@ -2,6 +2,9 @@
 # This script tests: pngtopam pnmtopng
 # Also requires:
 
+# Failure message
+## If this test fails and pnm-roundtrip2.test succeeds, it indicates
+## some problem with pnmtopng.
 
 # Test 1.  Should print 1926073387 101484 18 times
 for flags in "" -interlace \
diff --git a/test/png-roundtrip2.ok b/test/png-roundtrip2.ok
new file mode 100644
index 00000000..0e712ce7
--- /dev/null
+++ b/test/png-roundtrip2.ok
@@ -0,0 +1,4 @@
+1926073387 101484
+1926073387 101484
+2425386270 41
+2425386270 41
diff --git a/test/png-roundtrip2.test b/test/png-roundtrip2.test
new file mode 100755
index 00000000..af2ad029
--- /dev/null
+++ b/test/png-roundtrip2.test
@@ -0,0 +1,22 @@
+#! /bin/bash
+# This script tests: pngtopam pamtopng
+# Also requires:
+
+# Failure message
+## If this test fails and pnm-roundtrip.test succeeds, it indicates
+## some problem with pamtopng.
+##
+## If both tests fail, the likely cause is a problem with pngtopam.
+## It is also possible that there is some problem in libpng.
+
+# Test 1.  Should print 1926073387 101484 twice
+for flags in "" -gamma=.45
+  do
+  pamtopng testimg.ppm $flags | pngtopam | cksum
+  done
+
+# Test 2.  Should print 2425386270 41 twice
+for flags in "" -gamma=.45
+  do
+  pamtopng testgrid.pbm $flags | pngtopam | cksum
+  done
diff --git a/test/sunicon-roundtrip.ok b/test/sunicon-roundtrip.ok
new file mode 100644
index 00000000..845be5fb
--- /dev/null
+++ b/test/sunicon-roundtrip.ok
@@ -0,0 +1 @@
+2425386270 41
diff --git a/test/sunicon-roundtrip.test b/test/sunicon-roundtrip.test
new file mode 100755
index 00000000..a52fda68
--- /dev/null
+++ b/test/sunicon-roundtrip.test
@@ -0,0 +1,8 @@
+#! /bin/bash
+# This script tests: pbmtosunicon sunicontopnm
+# Also requires: pamcut
+
+# Width of Sun icons are multiples of 8.
+
+# Test.  Should print: 2425386270 41
+pbmtosunicon testgrid.pbm | sunicontopnm | pamcut 1 0 14 16 | cksum