blob: 7f3053ae8c1b3c6eaa2fb7fe78670cc73b7c0fdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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',
);
|