about summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-07-03 16:54:51 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2015-07-03 16:54:51 +0000
commit1b17cc595dbefdf5f5111db8534ec3bce500412e (patch)
tree29d914152182ac6149cd55a5042d8cf65ca1b59e /test
parenta5dc3942f3204d46702832ee2c21c2bf4b99012b (diff)
downloadnetpbm-mirror-1b17cc595dbefdf5f5111db8534ec3bce500412e.tar.gz
netpbm-mirror-1b17cc595dbefdf5f5111db8534ec3bce500412e.tar.xz
netpbm-mirror-1b17cc595dbefdf5f5111db8534ec3bce500412e.zip
cleanup: factor out runlength encoding
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2600 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'test')
-rw-r--r--test/ilbm-roundtrip.ok8
-rwxr-xr-xtest/ilbm-roundtrip.test21
-rw-r--r--test/sgi-roundtrip.ok2
-rwxr-xr-xtest/sgi-roundtrip.test9
4 files changed, 38 insertions, 2 deletions
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/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}