Archive-Raw
view release on metacpan or search on metacpan
t/05-match_include_gid.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use Test::More;
use Archive::Raw;
my $reader = Archive::Raw::Reader->new();
isa_ok $reader, 'Archive::Raw::Reader';
$reader->open_filename ('test_archive.tar.gz');
my $match = Archive::Raw::Match->new;
isa_ok $match, 'Archive::Raw::Match';
my $entry = $reader->next();
$entry = $reader->next();
$match->include_gid (0);
is $entry->pathname, 'dir/file2.txt';
ok ($match->excluded ($entry));
ok ($match->owner_excluded ($entry));
$entry = $reader->next();
$entry = $reader->next();
$match->include_gid (20);
is $entry->pathname, 'dir/file1.txt';
ok (!$match->excluded ($entry));
ok (!$match->owner_excluded ($entry));
done_testing;
( run in 2.142 seconds using v1.01-cache-2.11-cpan-97f6503c9c8 )