test: add testdeflatelaststripextradata.sh
This commit is contained in:
parent
3a2de853a9
commit
b9fa1f6e4a
@ -109,7 +109,8 @@ set(TESTSCRIPTS
|
||||
tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh
|
||||
tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh
|
||||
tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh
|
||||
testfax4.sh)
|
||||
testfax4.sh
|
||||
testdeflatelaststripextradata.sh)
|
||||
|
||||
# This list should contain all of the TIFF files in the 'images'
|
||||
# subdirectory which are intended to be used as input images for
|
||||
|
@ -150,6 +150,7 @@ TESTSCRIPTS = \
|
||||
tiff2rgba-rgb-3c-16b.sh \
|
||||
tiff2rgba-rgb-3c-8b.sh \
|
||||
testfax4.sh \
|
||||
testdeflatelaststripextradata.sh \
|
||||
$(JPEG_DEPENDENT_TESTSCRIPTS)
|
||||
|
||||
# This list should contain the references files
|
||||
@ -159,7 +160,8 @@ REFFILES = \
|
||||
refs/o-tiff2ps-PS1.ps \
|
||||
refs/o-tiff2ps-PS2.ps \
|
||||
refs/o-tiff2ps-PS3.ps \
|
||||
refs/o-testfax4.tiff
|
||||
refs/o-testfax4.tiff \
|
||||
refs/o-deflate-last-strip-extra-data.tiff
|
||||
|
||||
# This list should contain all of the TIFF files in the 'images'
|
||||
# subdirectory which are intended to be used as input images for
|
||||
@ -181,7 +183,8 @@ TIFFIMAGES = \
|
||||
images/ojpeg_zackthecat_subsamp22_single_strip.tiff \
|
||||
images/ojpeg_chewey_subsamp21_multi_strip.tiff \
|
||||
images/ojpeg_single_strip_no_rowsperstrip.tiff \
|
||||
images/testfax4.tiff
|
||||
images/testfax4.tiff \
|
||||
images/deflate-last-strip-extra-data.tiff
|
||||
|
||||
PNMIMAGES = \
|
||||
images/minisblack-1c-8b.pgm \
|
||||
|
@ -30,3 +30,6 @@ PNM files:
|
||||
|
||||
G3 Fax files :
|
||||
miniswhite-1c-1b.g3
|
||||
|
||||
deflate-last-strip-extra-data.tiff is
|
||||
https://github.com/OSGeo/gdal/blob/master/autotest/alg/data/utmsmall_near.tiff
|
||||
|
BIN
test/images/deflate-last-strip-extra-data.tiff
Normal file
BIN
test/images/deflate-last-strip-extra-data.tiff
Normal file
Binary file not shown.
BIN
test/refs/o-deflate-last-strip-extra-data.tiff
Normal file
BIN
test/refs/o-deflate-last-strip-extra-data.tiff
Normal file
Binary file not shown.
43
test/testdeflatelaststripextradata.sh
Executable file
43
test/testdeflatelaststripextradata.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# check decoding of a deflate compressed file whose last strip which should
|
||||
# contain data for only 4 lines has more in it.
|
||||
. ${srcdir:-.}/common.sh
|
||||
infile="${IMAGES}/deflate-last-strip-extra-data.tiff"
|
||||
outfile="o-deflate-last-strip-extra-data.tiff"
|
||||
rm -f $outfile
|
||||
echo "$MEMCHECK ${TIFFCP} -c zip $infile $outfile"
|
||||
eval "$MEMCHECK ${TIFFCP} -c zip $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
|
||||
|
||||
outfile="o-deflate-last-strip-extra-data-tiled.tiff"
|
||||
rm -f $outfile
|
||||
echo "$MEMCHECK ${TIFFCP} -c zip -t -w 256 -l 256 $infile $outfile"
|
||||
eval "$MEMCHECK ${TIFFCP} -c zip -t -w 256 -l 256 $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}/o-deflate-last-strip-extra-data.tiff"
|
||||
eval "$MEMCHECK ${TIFFCMP} $outfile ${REFS}/o-deflate-last-strip-extra-data.tiff"
|
||||
status=$?
|
||||
if [ $status != 0 ] ; then
|
||||
echo "Returned failed status $status!"
|
||||
echo "\"${outfile}\" differs from reference file."
|
||||
exit $status
|
||||
fi
|
Loading…
Reference in New Issue
Block a user