1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
use lib 't/lib';
use Test2::V0 -no_srand => 1;
use File::Spec;
use TestPath;
diag '';
diag '';
diag '';
my $found_square_bracket = 0;
my $found_test = 0;
foreach my $path (split(($^O eq 'MSWin32' ? ';' : ':'), $ENV{PATH}))
{
#diag "PATH = $path";
if(-x File::Spec->catfile($path, '['))
{
diag "found $path / [";
$found_square_bracket = 1;
}
if(-x File::Spec->catfile($path, 'test'))
{
diag "found $path / test";
$found_test = 1;
}
foreach my $shell (qw( tcsh csh bash sh zsh command.com cmd.exe ksh 44bsd-csh jsh powershell.exe fish ))
{
if(-x File::Spec->catfile($path, $shell))
{
diag "found $path / $shell (shell)";
}
}
}
unless($found_square_bracket)
{
diag "did not find [";
}
unless($found_test)
{
diag "DID NOT FIND test, CSH TEST WILL LIKELY FAIL";
}
diag '';
diag '';
diag '';
if($TestPath::WSL)
{
diag "Looks like you are running on Windows Subsystem for Linux. Filtering PATH.";
diag '';
diag '';
diag '';
}
pass 'okay';
done_testing;
|