Help language development. Donate to The Perl Foundation

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

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

use Test;
use FileSystem::Parent;

# $pass0 && $pass1 are Seq.

my $append  = 'lib';

my $pass0   = scan-up :$append;
ok $pass0,   'scan-up $append';

my $pass1   = scan-up :$append, from => $*PROGRAM-NAME;
ok $pass1,   'scan-up $append :from => $*PROGRAM-NAME';

put '# Pass0', $pass0;
put '# Pass1', $pass1;

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

ok $pass0 ~~ /$append $/, "Found $append";

done-testing;