Help language development. Donate to The Perl Foundation

FindBin cpan:LEMBARK last updated on 2020-01-21

t/08-cmdline-script.rakutest
# $ raku -M'FindBin' -e 'say Bin.Str';
# # Resolve:  True
# # Bin from: '-e'
# # Path is:  '/sandbox/lembark/Modules/Raku/FindBin/-e'
# /sandbox/lembark/Modules/Raku/FindBin
 
use v6.d;
use lib $*PROGRAM.parent(2).add( 'lib' ).absolute;

use Test;

# make the module accessable to the raku command line code.

my $expect  = '-e';

my ( $found ) = qx{ raku -I./lib -M'FindBin' -e 'say Script' }.chomp;

say "# Expect: '$expect'";
say "# Found:  '$found'";

is $found, $expect, "'raku -e' returns '$found' ($expect)";


done-testing;