use v6;

use Test;
use File::Which;

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

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);
}

use v6;

use Test;
use File::Which;

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

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);
}

Make test on window versions with wordpad app
Make test on window versions with wordpad app

Windows 11 does not contain wordpad. Test checking for presence of wordpad was failing.