File-Next
view release on metacpan or search on metacpan
my @expected = @{+shift};
my $msg = shift;
# Normalize all the paths
for my $path ( @expected, @actual ) {
$path = File::Next::reslash( $path );
}
local $Test::Builder::Level = $Test::Builder::Level + 1; ## no critic
eval 'use Test::Differences';
if ( !$@ ) {
return eq_or_diff( [sort @actual], [sort @expected], $msg );
}
else {
return is_deeply( [sort @actual], [sort @expected], $msg );
}
}
1;
use strict;
use warnings;
use Test::More tests => 10;
use lib 't';
use Util;
use File::Next;
# use Test::Differences;
# eq_or_diff \@got, [qw( a b c )], "testing arrays";
JUST_A_FILE: {
my $iter = File::Next::files( 't/pod.t' );
isa_ok( $iter, 'CODE' );
my @actual = slurp( $iter );
my @expected = qw(
t/pod.t
);
t/from_file.t view on Meta::CPAN
use Test::More tests => 22;
use lib 't';
use Util;
use File::Copy ();
use File::Temp;
use File::Next;
# use Test::Differences;
# eq_or_diff \@got, [qw( a b c )], "testing arrays";
my @expected = qw(
t/00-load.t
t/api.t
t/basic.t
t/dirs.t
t/dot.t
t/everything.t
t/follow.t
( run in 0.510 second using v1.01-cache-2.11-cpan-df04353d9ac )