Help language development. Donate to The Perl Foundation

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

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

use Test;
use FileSystem::Parent;

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

my $pick_all    := -> IO $path { True };

my $append  = 'lib';

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

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

put "# Pass0\t", $pass0.join( "\n\t" );
put "# Pass1\t", $pass1.join( "\n\t" );

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

done-testing;