summaryrefslogtreecommitdiff
path: root/t/21_zip64.t
blob: f337db861fb1aed393e689b4a266c340d3094132 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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');