Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (41 sloc) 986 Bytes
use 5.006;
use strict;
use warnings;
use Test::More 0.92;
use File::Temp;
use Test::Deep qw/cmp_deeply/;
use File::pushd qw/pushd/;
use lib 't/lib';
use PCNTest;
use PIRTiny;
#--------------------------------------------------------------------------#
{
my @tree = qw(
aaaa.txt
bbbb.txt
cccc/dddd.txt
cccc/eeee/ffff.txt
gggg.txt
);
my @breadth = qw(
.
aaaa.txt
bbbb.txt
cccc
gggg.txt
cccc/dddd.txt
cccc/eeee
cccc/eeee/ffff.txt
);
my $td = make_tree(@tree);
my ( $iter, @files );
my $rule = PIRTiny->new;
@files = map { unixify( $_, $td ) } $rule->all($td);
cmp_deeply( \@files, \@breadth, "Object-based subclass (all)" )
or diag explain \@files;
@files = map { unixify( $_, $td ) } $rule->all_fast($td);
cmp_deeply( [ sort @files ], [ sort @breadth ], "Object-based subclass (all_fast)" )
or diag explain \@files;
}
done_testing;
# COPYRIGHT
Something went wrong with that request. Please try again.