summaryrefslogtreecommitdiff
path: root/t/11_explorer.t
diff options
context:
space:
mode:
Diffstat (limited to 't/11_explorer.t')
-rw-r--r--t/11_explorer.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/11_explorer.t b/t/11_explorer.t
new file mode 100644
index 0000000..7f3053a
--- /dev/null
+++ b/t/11_explorer.t
@@ -0,0 +1,23 @@
+#!/use/bin/perl
+
+# Check Windows Explorer compatible directories
+
+use strict;
+
+BEGIN {
+ $| = 1;
+ $^W = 1;
+}
+
+use Test::More tests => 4;
+use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
+
+my $zip = Archive::Zip->new;
+isa_ok($zip, 'Archive::Zip');
+my $member = $zip->addDirectory('foo/');
+ok(defined($member), 'Created a member');
+is($member->fileName, 'foo/', '->fileName ok');
+ok(
+ $member->externalFileAttributes & 16,
+ 'Directory has directory bit set as expected by Windows Explorer',
+);