Archive-Zip

 view release on metacpan or  search on metacpan

t/18_bug_92205.t  view on Meta::CPAN


use lib 't';
use common;

# RT #92205: CRC error when re-writing Zip created by LibreOffice

# Archive::Zip was blowing up when processing member
# 'Configurations2/accelerator/current.xml' from the LibreOffice file.
#
# 'current.xml' is a zero length file that has been compressed AND uses
# streaming. That means the uncompressed length is zero but the compressed
# length is greater than 0.
#
# The fix for issue #101092 added code that forced both the uncompressed &
# compressed lengths to be zero if either was zero. That caused this issue.

# This set of test checks that a zero length zip member will ALWAYS be
# mapped to a zero length stored member, regardless of the compression
# method used or the use of streaming.
#
# Input files all contain a single zero length member.
# Streaming & Compression Method are set as follows.
#
# File                Streamed    Method
# ===============================================
# emptydef.zip        No          Deflate
# emptydefstr.zip     Yes         Deflate
# emptystore.zip      No          Store
# emptystorestr.zip   Yes         Store



( run in 0.341 second using v1.01-cache-2.11-cpan-4d50c553e7e )