File: 02-win32.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 (19 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use v6;

use Test;
use File::Which;

my @execs = ('calc', 'cmd', 'explorer', 'notepad', 'wordpad');

plan @execs.elems * 2;

unless $*DISTRO.is-win {
  skip-rest("Windows-only tests");
  exit;
}

for @execs -> $exec {
  my Str $path = which($exec);
  ok $path.defined, sprintf("Found '%s' at '%s'", $exec, $path);
  ok $path.IO ~~ :e, sprintf("Path '%s' is found", $path);
}