Fixed the windows explorer bug
[archive-zip.git] / t / 11_explorer.t
blobc98afb5d908d451f417f1013b8fac73d36a3b282
1 #!/use/bin/perl
3 # Check Windows Explorer compatible directories
5 use strict;
6 BEGIN {
7 $| = 1;
8 $^W = 1;
11 use Test::More tests => 4;
12 use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
14 my $zip = Archive::Zip->new;
15 isa_ok( $zip, 'Archive::Zip' );
16 my $member = $zip->addDirectory('foo/');
17 ok(defined($member), 'Created a member');
18 is($member->fileName, 'foo/', '->fileName ok');
19 ok(
20 $member->externalFileAttributes & 16,
21 'Directory has directory bit set as expected by Windows Explorer',