summaryrefslogtreecommitdiff
path: root/t/21_zip64.t
diff options
context:
space:
mode:
Diffstat (limited to 't/21_zip64.t')
-rw-r--r--t/21_zip64.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/21_zip64.t b/t/21_zip64.t
new file mode 100644
index 0000000..f337db8
--- /dev/null
+++ b/t/21_zip64.t
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+# Test to make sure zip64 files are properly detected
+
+use strict;
+use warnings;
+
+use Archive::Zip qw( :ERROR_CODES );
+use File::Spec;
+use t::common;
+
+use Test::More tests => 1;
+
+my $DATA_DIR = File::Spec->catfile('t', 'data');
+my $ZIP_FILE = File::Spec->catfile($DATA_DIR, "zip64.zip");
+
+my @errors = ();
+$Archive::Zip::ErrorHandler = sub { push @errors, @_ };
+eval { Archive::Zip->new($ZIP_FILE) };
+ok($errors[0] =~ /zip64 not supported/, 'Got expected zip64 error');