Archive-Zip
view release on metacpan or search on metacpan
1.40 Sun 04 Jan 2015
- https://rt.cpan.org/Public/Bug/Display.html?id=92205 [cpan/PMQS]
- https://rt.cpan.org/Public/Bug/Display.html?id=101092 [cpan/PMQS]
1.39 Tue 21 Oct 2014
- store test data in temp dirs to fix parallelism and shuffling
[Graham Knop]
1.38 Tue 02 Sep 2014
- Setting unicode flag for each member when using $Archive::Zip::UNICODE [github.com/lackas]
https://rt.cpan.org/Ticket/Display.html?id=83367
1.37 Wed 08 Jan 2014
- Need newer Test::More to support done_testing() [thaljef]
1.36 Mon 30 Dec 2013
- Fix error in version update with 1.35 [RT #91744]
1.35 Mon 30 Dec 2013
- fallback on copy if move gives permission denied [github.com/plicease]
t/14_leading_separator.t
t/15_decrypt.t
t/16_decrypt.t
t/17_101092.t
t/18_bug_92205.t
t/19_bug_101240.t
t/20_bug_github11.t
t/21_zip64.t
t/22_deflated_dir.t
t/23_closed_handle.t
t/24_unicode_win32.t
t/25_traversal.t
t/26_bzip2.t
t/27_symlinks.t
t/28_zip64_unsupported.t
t/common.pm
t/data/bad_github11.zip
t/data/bzip.zip
t/data/chmod.zip
t/data/crypcomp.zip
t/data/crypt.zip
t/19_bug_101240.t view on Meta::CPAN
my $input_file = testPath("empty.zip");
# Create a zip file that contains a member where compressed size is 0
{
my $zip = Archive::Zip->new();
my $string_member = $zip->addString( '', 'fred' );
$string_member->desiredCompressionMethod(COMPRESSION_STORED);
azok($zip->writeToFileNamed($input_file));
}
for my $unicode (0, 1)
{
local $Archive::Zip::UNICODE = $unicode;
my $zip = Archive::Zip->new();
azok($zip->read($input_file));
my $test_file = testPath("test_file$unicode");
$zip->memberNamed("fred")->extractToFileNamed($test_file);
ok(-e $test_file, "[UNICODE=$unicode] output file exists");
is(-s $test_file, 0, "[UNICODE=$unicode] output file is empty");
}
t/24_unicode_win32.t view on Meta::CPAN
{
mkdir(testPath('folder')) or die;
open(my $euro_file, ">", testPath('folder', $euro_filename)) or die;
print $euro_file "File EURO\n" or die;
close($euro_file) or die;
}
# create member called $euro_filename with addTree
cata(sub { $_[0]->addTree(testPath('folder'), 'folder') },
["folder/", "folder/$euro_filename"],
"Checking that a file named with unicode chars was added properly by addTree");
# create member called $euro_filename with addString
cata(sub { $_[0]->addString(TESTSTRING => $euro_filename) },
[$euro_filename],
"Checking that a file named with unicode chars was added properly by addString");
# create member called $euro_filename with addFile
# use a temp file so its name doesn't match internal name
cata(sub { my ($tmp_file, $tmp_filename) =
File::Temp::tempfile('eurotest-XXXX', DIR => testPath());
$tmp_file->print("File EURO\n") or die;
$tmp_file->close() or die;
$_[0]->addFile($tmp_filename => $euro_filename); },
[$euro_filename],
"Checking that a file named with unicode chars was added properly by addFile");
# create member called $euro_filename with addDirectory
cata(sub { $_[0]->addDirectory(testPath('folder') => $euro_filename) },
[$euro_filename . '/'],
"Checking that a file named with unicode chars was added properly by addDirectory");
# create member called $euro_filename with addFileOrDirectory from a directory
cata(sub { $_[0]->addFileOrDirectory(testPath('folder') => $euro_filename) },
[$euro_filename . '/'],
"Checking that a file named with unicode chars was added properly by addFileOrDirectory from a direcotry");
# create member called $euro_filename with addFileOrDirectory from a file
# use a temp file so its name doesn't match internal name
cata(sub { my ($tmp_file, $tmp_filename) =
File::Temp::tempfile('eurotest-XXXX', DIR => testPath());
$tmp_file->print("File EURO\n") or die;
$tmp_file->close() or die;
$_[0]->addFileOrDirectory($tmp_filename => $euro_filename); },
[$euro_filename],
"Checking that a file named with unicode chars was added properly by addFileOrDirectory from a file");
( run in 1.016 second using v1.01-cache-2.11-cpan-88abd93f124 )