File: 01-which.rakutest

package info (click to toggle)
raku-file-which 1.0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: makefile: 4; sh: 2
file content (18 lines) | stat: -rw-r--r-- 359 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use v6;

use Test;

plan 4;

use File::Which;
ok 1, "'use File::Which' worked!";

my $raku = which('raku');
diag "Found raku at '$raku'";
ok $raku.defined, "raku is found";
ok $raku.IO ~~ :e, "raku file exists";
if $*DISTRO.is-win {
  skip("Windows does not set an executable file permission", 1);
} else {
  ok $raku.IO ~~ :x, "raku and is an executable";
}