diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-31 18:59:09 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-07-31 18:59:09 +0000 |
commit | 42c8b23669eac442a303190dad44d78cea63cf59 (patch) | |
tree | 1cc49a1a1813bd802988e88058f353a4e0a23514 /t/12_bug_47223.t | |
download | Archive-Zip-tarball-master.tar.gz |
Archive-Zip-1.49HEADArchive-Zip-1.49master
Diffstat (limited to 't/12_bug_47223.t')
-rw-r--r-- | t/12_bug_47223.t | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/t/12_bug_47223.t b/t/12_bug_47223.t new file mode 100644 index 0000000..685a57d --- /dev/null +++ b/t/12_bug_47223.t @@ -0,0 +1,34 @@ +#!/use/bin/perl + +# Check Windows Explorer compatible directories + +use strict; + +BEGIN { + $| = 1; + $^W = 1; +} + +use Test::More; +use Archive::Zip; +use File::Temp; +use File::Spec; + +if ($^O eq 'MSWin32') { + plan(tests => 1); +} else { + plan(skip_all => 'Only required on Win32.'); +} + +my $dist = Win32::GetShortPathName( + File::Spec->rel2abs(File::Spec->catfile(qw(t data winzip.zip)))); +my $tmpdirname = File::Spec->catdir(File::Spec->tmpdir, "parXXXXX"); +my $tmpdir = File::Temp::mkdtemp($tmpdirname) + or die "Could not create temporary directory from template '$tmpdirname': $!"; +my $path = $tmpdir; +$path = File::Spec->catdir($tmpdir, 'test'); + +my $zip = Archive::Zip->new(); + +$zip->read($dist); +ok(eval { $zip->extractTree('', "$path/"); 1; }); |