diff options
author | Even Rouault <even.rouault@spatialys.com> | 2020-03-06 09:03:45 +0000 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2020-03-06 09:03:45 +0000 |
commit | bba9d00d776e11fdfa73de926220af26eb935532 (patch) | |
tree | 80392e84b14983a49a2b359088edc24fca3a6188 /test | |
parent | a712dc3f42a3f8b04829ae6d356df78f4a3382a7 (diff) | |
parent | ff56dc47af268ef0fb9f8c4b12a995088419e176 (diff) | |
download | libtiff-git-bba9d00d776e11fdfa73de926220af26eb935532.tar.gz |
Merge branch 'fax-test' into 'master'
add test for fax4 decoding
See merge request libtiff/libtiff!114
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | test/Makefile.am | 7 | ||||
-rw-r--r-- | test/images/testfax4.tiff | bin | 0 -> 39637 bytes | |||
-rw-r--r-- | test/refs/o-testfax4.tiff | bin | 0 -> 106326 bytes | |||
-rwxr-xr-x | test/testfax4.sh | 24 |
5 files changed, 33 insertions, 4 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 50904599..53a5195d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -108,7 +108,8 @@ set(TESTSCRIPTS tiff2rgba-quad-tile.jpg.sh tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh - tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh) + tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh + testfax4.sh) # This list should contain all of the TIFF files in the 'images' # subdirectory which are intended to be used as input images for @@ -129,7 +130,8 @@ set(TIFFIMAGES images/lzw-single-strip.tiff images/ojpeg_zackthecat_subsamp22_single_strip.tiff images/ojpeg_chewey_subsamp21_multi_strip.tiff - images/ojpeg_single_strip_no_rowsperstrip.tiff) + images/ojpeg_single_strip_no_rowsperstrip.tiff + images/testfax4.tiff) set(BMPIMAGES images/palette-1c-8b.bmp diff --git a/test/Makefile.am b/test/Makefile.am index c70ce05f..c3ab3ec3 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -149,6 +149,7 @@ TESTSCRIPTS = \ tiff2rgba-palette-1c-8b.sh \ tiff2rgba-rgb-3c-16b.sh \ tiff2rgba-rgb-3c-8b.sh \ + testfax4.sh \ $(JPEG_DEPENDENT_TESTSCRIPTS) # This list should contain the references files @@ -157,7 +158,8 @@ REFFILES = \ refs/o-tiff2ps-EPS1.ps \ refs/o-tiff2ps-PS1.ps \ refs/o-tiff2ps-PS2.ps \ - refs/o-tiff2ps-PS3.ps + refs/o-tiff2ps-PS3.ps \ + refs/o-testfax4.tiff # This list should contain all of the TIFF files in the 'images' # subdirectory which are intended to be used as input images for @@ -178,7 +180,8 @@ TIFFIMAGES = \ images/lzw-single-strip.tiff \ images/ojpeg_zackthecat_subsamp22_single_strip.tiff \ images/ojpeg_chewey_subsamp21_multi_strip.tiff \ - images/ojpeg_single_strip_no_rowsperstrip.tiff + images/ojpeg_single_strip_no_rowsperstrip.tiff \ + images/testfax4.tiff PNMIMAGES = \ images/minisblack-1c-8b.pgm \ diff --git a/test/images/testfax4.tiff b/test/images/testfax4.tiff Binary files differnew file mode 100644 index 00000000..f7f2629c --- /dev/null +++ b/test/images/testfax4.tiff diff --git a/test/refs/o-testfax4.tiff b/test/refs/o-testfax4.tiff Binary files differnew file mode 100644 index 00000000..cad45045 --- /dev/null +++ b/test/refs/o-testfax4.tiff diff --git a/test/testfax4.sh b/test/testfax4.sh new file mode 100755 index 00000000..6f465e8f --- /dev/null +++ b/test/testfax4.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# +# check decoding of a CCITT Group 4 encoded TIFF +# with 0 length runs +. ${srcdir:-.}/common.sh +infile="${IMAGES}/testfax4.tiff" +outfile="o-testfax4.tiff" +rm -f $outfile +echo "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" +eval "$MEMCHECK ${TIFFCP} -c lzw $infile $outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "Output (if any) is in \"${outfile}\"." + exit $status +fi +echo "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/$outfile" +status=$? +if [ $status != 0 ] ; then + echo "Returned failed status $status!" + echo "\"${outfile}\" differs from reference file." + exit $status +fi |