Help language development. Donate to The Perl Foundation

FileSystem::Parent cpan:LEMBARK last updated on 2019-08-10

t/13-wanted-subdir-all.t
use v6.d;
use lib $*PROGRAM.parent(2).add( 'lib' ).absolute;

use Test;
use FileSystem::Parent;

my $verbose 
= %*ENV< VERBOSE > 
?? True 
!! False
;

sub pick_all
(
    IO $path --> Bool
)
{
    True
}

my $append  = 'lib';

my $pass0  = scan-up :$verbose, :$append, filter => &pick_all;
ok $pass0,  'scan-up with filter';

my $pass1  = scan-up :$verbose  :$append, filter => &pick_all, :from( $*PROGRAM-NAME );
ok $pass1,  'scan-up with filter and start';

ok $pass0 ~~ $pass1, 'Bin and $*Program-Name return same list.';

done-testing;