about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Test-Order5
-rw-r--r--test/all-in-place.ok3
-rwxr-xr-xtest/all-in-place.test3
-rw-r--r--test/ilbm-roundtrip.ok8
-rwxr-xr-xtest/ilbm-roundtrip.test21
-rw-r--r--test/legacy-names.ok1
-rwxr-xr-xtest/legacy-names.test1
-rw-r--r--test/lookup-roundtrip.ok1
-rwxr-xr-xtest/lookup-roundtrip.test12
-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/sgi-roundtrip.ok2
-rwxr-xr-xtest/sgi-roundtrip.test9
-rw-r--r--test/sunicon-roundtrip.ok1
-rwxr-xr-xtest/sunicon-roundtrip.test8
18 files changed, 167 insertions, 4 deletions
diff --git a/test/Test-Order b/test/Test-Order
index d21b9e8a..92efca05 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
@@ -100,6 +102,7 @@ rgb3-roundtrip.test
 ppmchange-roundtrip.test
 pamdice-roundtrip.test
 pamslice-roundtrip.test
+lookup-roundtrip.test
 
 # Round-trip tests : lossless converters
 
@@ -129,11 +132,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..6ba75993 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
@@ -104,6 +104,7 @@ pamtouil: ok
 pamtowinicon: ok
 pamtoxvmini: ok
 pamundice: ok
+pamunlookup: ok
 pamvalidate: ok
 pamwipeout: ok
 pamx: ok
diff --git a/test/all-in-place.test b/test/all-in-place.test
index 79459f7a..4c8af56b 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 \
@@ -143,6 +143,7 @@ ordinary_testprogs="\
   pamtowinicon \
   pamtoxvmini \
   pamundice \
+  pamunlookup \
   pamvalidate \
   pamwipeout \
   pamx \
diff --git a/test/ilbm-roundtrip.ok b/test/ilbm-roundtrip.ok
index cd357916..54574a18 100644
--- a/test/ilbm-roundtrip.ok
+++ b/test/ilbm-roundtrip.ok
@@ -1,2 +1,10 @@
+829921912 685
+829921912 685
+829921912 685
+829921912 685
+1926073387 101484
+1926073387 101484
 1926073387 101484
 984199586 101484
+2059976475 661
+2059976475 661
diff --git a/test/ilbm-roundtrip.test b/test/ilbm-roundtrip.test
index a13fc8be..f62368ff 100755
--- a/test/ilbm-roundtrip.test
+++ b/test/ilbm-roundtrip.test
@@ -2,10 +2,27 @@
 # This script tests: ppmtoilbm ilbmtoppm
 # Also requires: pamseq pamdepth pamtopnm pnmremap
 
+#Test. 1  Should produce 829921912 685 four times
+#Output is PPM raw, 14 by 16  maxval 255
+ppmtoilbm testgrid.pbm | ilbmtoppm | cksum
+ppmtoilbm -aga testgrid.pbm | ilbmtoppm | cksum
+ppmtoilbm -ham6 testgrid.pbm | ilbmtoppm | cksum
+ppmtoilbm -ham8 testgrid.pbm | ilbmtoppm | cksum
 
-#Test.  Should produce 1926073387 101484
+
+#Test. 2  Should produce 1926073387 101484 three times
 ppmtoilbm testimg.ppm | ilbmtoppm | cksum
+ppmtoilbm -24force testimg.ppm | ilbmtoppm | cksum
+ppmtoilbm -dcbits 8 8 8 -nocompress testimg.ppm | ilbmtoppm | cksum
+
 
-#Test.  Should print 984199586 101484
+#Test. 3  Should print 984199586 101484
 pamseq 3 5 -tupletype=RGB | pamdepth 255 | pamtopnm | \
   pnmremap -mapfile=- testimg.ppm | ppmtoilbm | ilbmtoppm | cksum
+
+
+#Test. 4 Should print 2059976475 661 twice
+pamseq 3 5 -tupletype=RGB | pamtopnm | \
+  ppmtoilbm -compress | ilbmtoppm | cksum
+pamseq 3 5 -tupletype=RGB | pamtopnm | \
+  ppmtoilbm -nocompress | ilbmtoppm | cksum
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/lookup-roundtrip.ok b/test/lookup-roundtrip.ok
new file mode 100644
index 00000000..82eac5a8
--- /dev/null
+++ b/test/lookup-roundtrip.ok
@@ -0,0 +1 @@
+1926073387 101484
diff --git a/test/lookup-roundtrip.test b/test/lookup-roundtrip.test
new file mode 100755
index 00000000..63ec0777
--- /dev/null
+++ b/test/lookup-roundtrip.test
@@ -0,0 +1,12 @@
+#! /bin/bash
+# This script tests: pamlookup pamunlookup
+# Also requires: ppmhist
+
+tmpdir=${tmpdir:-/tmp}
+mapfile=${tmpdir}/mapfile
+
+ppmhist testimg.ppm -map > ${mapfile}
+
+# Test.  Should produce 1926073387 101484
+pamunlookup -lookupfile=${mapfile} testimg.ppm |\
+  pamlookup -lookupfile=${mapfile} | cksum
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/sgi-roundtrip.ok b/test/sgi-roundtrip.ok
index 541d59b1..b1bd5ba6 100644
--- a/test/sgi-roundtrip.ok
+++ b/test/sgi-roundtrip.ok
@@ -4,3 +4,5 @@
 1926073387 101484
 538848130 235
 538848130 235
+2394972481 463
+2394972481 463
diff --git a/test/sgi-roundtrip.test b/test/sgi-roundtrip.test
index 5012aab7..88efb75e 100755
--- a/test/sgi-roundtrip.test
+++ b/test/sgi-roundtrip.test
@@ -32,3 +32,12 @@ rm ${b_sgi} ${b_red} ${b_grn} ${b_blu}
 # Test 3.  Should produce 2425386270 41 twice
 pnmtosgi testgrid.pbm | sgitopnm | cksum             # Defaults to -rle
 pnmtosgi -verbatim testgrid.pbm | sgitopnm | cksum
+
+
+testgrid_pgm=${tmpdir}/testgrid.pgm
+
+# Test 4. Should produce 2394972481 463 twice
+pamdepth 65535 testgrid.pbm | pamtopnm | tee ${testgrid_pgm} | \
+  pnmtosgi -rle | sgitopnm | cksum
+pnmtosgi -verbatim ${testgrid_pgm} | sgitopnm | cksum
+rm ${testgrid_pgm}
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