about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-02-26 01:58:31 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2017-02-26 01:58:31 +0000
commit8bfe8066674854271302acb6de4080f64cd1758b (patch)
tree11d94e512aa471ca77d74eb17f0b66cae9dab5ed
parent486e3557d71f3264fe6a3380b4cf41a67ab8d312 (diff)
downloadnetpbm-mirror-8bfe8066674854271302acb6de4080f64cd1758b.tar.gz
netpbm-mirror-8bfe8066674854271302acb6de4080f64cd1758b.tar.xz
netpbm-mirror-8bfe8066674854271302acb6de4080f64cd1758b.zip
Pamtotiff test improvements - use pipes, test more features
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2905 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--test/tiff-flate-lzw-roundtrip.ok2
-rwxr-xr-xtest/tiff-flate-lzw-roundtrip.test23
-rw-r--r--test/tiff-roundtrip.ok4
-rwxr-xr-xtest/tiff-roundtrip.test27
4 files changed, 30 insertions, 26 deletions
diff --git a/test/tiff-flate-lzw-roundtrip.ok b/test/tiff-flate-lzw-roundtrip.ok
index 2ded49dc..0ee3e083 100644
--- a/test/tiff-flate-lzw-roundtrip.ok
+++ b/test/tiff-flate-lzw-roundtrip.ok
@@ -2,4 +2,6 @@
 764594701 101484
 764594701 101484
 764594701 101484
+764594701 101484
+764594701 101484
 2425386270 41
diff --git a/test/tiff-flate-lzw-roundtrip.test b/test/tiff-flate-lzw-roundtrip.test
index dda5b9f9..7e28a899 100755
--- a/test/tiff-flate-lzw-roundtrip.test
+++ b/test/tiff-flate-lzw-roundtrip.test
@@ -9,32 +9,25 @@
 
 tmpdir=${tmpdir:-/tmp}
 
-test40_ppm=${tmpdir}/testimg.ppm
-test1_tiff=${tmpdir}/test1.tiff
-test2_tiff=${tmpdir}/test2.tiff
-test3_tiff=${tmpdir}/test3.tiff
-test4_tiff=${tmpdir}/test4.tiff
+test40_ppm=${tmpdir}/testimg40.ppm
 
 # Make a test image with reduced colors which compresses better
 # cksum is 764594701 101484
  
 pnmquant 40 testimg.ppm | tee ${test40_ppm} | cksum
+pamtotiff ${test40_ppm} | tifftopnm | cksum
 
 # test flate compression
-pamtotiff -flate ${test40_ppm} 1<>${test1_tiff} &&
-  tifftopnm ${test1_tiff} | cksum
+pamtotiff -flate ${test40_ppm} | tifftopnm | cksum
 
 # test adobeflate compression
-pamtotiff -adobeflate ${test40_ppm} 1<>${test2_tiff} &&
-  tifftopnm ${test2_tiff} | cksum
+pamtotiff -adobeflate ${test40_ppm} | tifftopnm | cksum
 
 # test LZW compression
-pamtotiff -lzw ${test40_ppm} 1<>${test3_tiff} &&
-  tifftopnm ${test3_tiff} | cksum
+pamtotiff -lzw ${test40_ppm} | tifftopnm | cksum
+pamtotiff -lzw -predictor=1 ${test40_ppm} | tifftopnm | cksum
 
 # PBM image: test flate compression
-pamtotiff -flate testgrid.pbm 1<>${test4_tiff} &&
-  tifftopnm ${test4_tiff} | cksum
-
-rm ${test40_ppm} ${test1_tiff} ${test2_tiff} ${test3_tiff} ${test4_tiff}
+pamtotiff -flate testgrid.pbm | tifftopnm | cksum
 
+rm ${test40_ppm}
diff --git a/test/tiff-roundtrip.ok b/test/tiff-roundtrip.ok
index 0e712ce7..f6f04103 100644
--- a/test/tiff-roundtrip.ok
+++ b/test/tiff-roundtrip.ok
@@ -1,4 +1,8 @@
 1926073387 101484
 1926073387 101484
+1926073387 101484
+1926073387 101484
+1926073387 101484
+2425386270 41
 2425386270 41
 2425386270 41
diff --git a/test/tiff-roundtrip.test b/test/tiff-roundtrip.test
index df258eb1..747006b3 100755
--- a/test/tiff-roundtrip.test
+++ b/test/tiff-roundtrip.test
@@ -2,18 +2,23 @@
 # This script tests: pamtotiff tifftopnm
 # Also requires:
 
-pamtotiff testimg.ppm 1<>${tmpdir}/test1.tiff &&
-  tifftopnm ${tmpdir}/test1.tiff | cksum
+# Failure message
+## If this test fails, the cause may be a problem in the TIFF library.
 
-# test packbits compression
-pamtotiff -packbits testimg.ppm 1<>${tmpdir}/test2.tiff &&
-  tifftopnm ${tmpdir}/test2.tiff | cksum
+# PPM image
+# Should print 1926073387 101484 five times
 
-pamtotiff testgrid.pbm 1<>${tmpdir}/test3.tiff &&
-  tifftopnm ${tmpdir}/test3.tiff | cksum
+pamtotiff testimg.ppm | tifftopnm | cksum
+pamtotiff -truecolor testimg.ppm | tifftopnm | cksum
 
-# test G4 compression
-pamtotiff -g4 testgrid.pbm 1<>${tmpdir}/test4.tiff &&
-  tifftopnm ${tmpdir}/test4.tiff | cksum
+pamtotiff -truecolor -packbits testimg.ppm | tifftopnm | cksum
+pamtotiff -truecolor -rowsperstrip=2 testimg.ppm | tifftopnm | cksum
+pamtotiff -truecolor -lsb2msb  testimg.ppm | \
+  tifftopnm -respectfillorder | cksum
 
-rm ${tmpdir}/test[1234].tiff
+# PBM image
+# Should print 2425386270 41 three times
+
+pamtotiff testgrid.pbm | tifftopnm | cksum
+pamtotiff -g3 -fill testgrid.pbm | tifftopnm | cksum
+pamtotiff -g4 testgrid.pbm | tifftopnm | cksum