summaryrefslogtreecommitdiff
path: root/t/22_deflated_dir.t
diff options
context:
space:
mode:
Diffstat (limited to 't/22_deflated_dir.t')
-rw-r--r--t/22_deflated_dir.t25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/22_deflated_dir.t b/t/22_deflated_dir.t
new file mode 100644
index 0000000..dae2180
--- /dev/null
+++ b/t/22_deflated_dir.t
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Archive::Zip qw( :ERROR_CODES );
+use File::Spec;
+use t::common;
+
+use Test::More tests => 4;
+
+my $zip = Archive::Zip->new();
+isa_ok( $zip, 'Archive::Zip' );
+is( $zip->read(File::Spec->catfile('t', 'data', 'jar.zip')), AZ_OK, 'Read file' );
+
+my $ret = eval { $zip->writeToFileNamed(OUTPUTZIP) };
+
+is($ret, AZ_OK, 'Wrote file');
+
+my ($status, $zipout) = testZip();
+# STDERR->print("status= $status, out=$zipout\n");
+SKIP: {
+ skip( "test zip doesn't work", 1 ) if $testZipDoesntWork;
+ is( $status, 0, "output zip isn't corrupted" );
+}