Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Lowercase all OS names being checked against
As $*DISTRO.name is always lowercase and space deprived
  • Loading branch information
lizmat committed May 28, 2014
1 parent b103fcb commit a6f3a8b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion S02-magicals/config.t
Expand Up @@ -21,7 +21,7 @@ ok $?DISTRO.name, "We were compiled in '{$?DISTRO.name}'";
# $*DISTRO.name is the OS we are running
ok $*DISTRO.name, "We are running under '{$*DISTRO.name}'";

my $osnames = lc any <macosx linux freebsd MSWin32 mingw msys cygwin solaris haiku openbsd>;
my $osnames = any <macosx linux freebsd mswin32 mingw msys cygwin solaris haiku openbsd>;

#?rakudo skip 'unimpl $?OS'
ok $?DISTRO.name.lc eq $osnames, "we know of the OS we were compiled in";
Expand Down
6 changes: 3 additions & 3 deletions S32-io/IO-Socket-INET.t
Expand Up @@ -39,7 +39,7 @@ given $*DISTRO.name {
$netstat_cmd = "netstat -an -P tcp -f inet";
$netstat_pat = rx{ [ ^^ .+? '.' (\d+) ' ' .+? ]+ $ }; # same as darwin
}
when 'MSWin32' {
when 'mswin32' {
$netstat_cmd = "netstat -n";
$netstat_pat = rx{ State .+? [ ^^ .+? ':' (\d+) .+? ]+ $ }; # same as linux
}
Expand All @@ -66,10 +66,10 @@ if $port >= 65535 {
diag "{elapsed} Testing on port $port";


if $*DISTRO.name eq any <linux Linux darwin solaris MSWin32>, 'Mac OS X' { # please add more valid OS names
if $*DISTRO.name eq any <linux Linux darwin solaris mswin32 macosx> { # please add more valid OS names

my $is-win;
$is-win = True if $*DISTRO.name eq 'MSWin32';
$is-win = True if $*DISTRO.name eq 'mswin32';
my $runner = $is-win
?? "SET PERL6_BINARY={$*EXECUTABLE_NAME.path.absolute} &&"
!! "PERL6_BINARY={$*EXECUTABLE_NAME.path.absolute}";
Expand Down
6 changes: 1 addition & 5 deletions S32-io/io-path.t
Expand Up @@ -30,7 +30,7 @@ isa_ok $path.IO, IO::Handle, 'IO::Path.IO returns IO::Handle';
#?niecza skip 'is-absolute NYI'
#?DOES 2
{
if $*DISTRO.name eq any <Win32 MSWin32 os2 dos symbian NetWare> {
if $*DISTRO.name eq any <win32 mswin32 os2 dos symbian netware> {
ok "c:\\".path.is-absolute, "Win32ish OS loaded (volume)";
is "/".path.cleanup, "\\", "Win32ish OS loaded (back slash)"
}
Expand All @@ -43,7 +43,3 @@ isa_ok $path.IO, IO::Handle, 'IO::Path.IO returns IO::Handle';
is "/".path.cleanup, "/", "POSIX OS loaded (forward slash)"
}
}




2 changes: 1 addition & 1 deletion S32-io/io-spec-unix.t
Expand Up @@ -185,7 +185,7 @@ is $Unix.rel2abs('..','/t1/t2/t3'), '/t1/t2/t3/..', "rel2abs: ('..'
is $Unix.rel2abs('../t4','/t1/t2/t3'), '/t1/t2/t3/../t4', "rel2abs: ('../t4','/t1/t2/t3') -> '/t1/t2/t3/../t4'";
is $Unix.rel2abs('/t1','/t1/t2/t3'), '/t1', "rel2abs: ('/t1','/t1/t2/t3') -> '/t1'";

if $*DISTRO.name ~~ any(<MSWin32 os2 NetWare symbian dos cygwin>) {
if $*DISTRO.name ~~ any(<mswin32 os2 netware symbian dos cygwin>) {
skip_rest 'Unix on-platform tests'
}
else {
Expand Down
2 changes: 1 addition & 1 deletion S32-io/io-spec-win.t
Expand Up @@ -291,7 +291,7 @@ is $win32.rootdir, '\\', 'rootdir is "\\"';
is $win32.updir, '..', 'updir is ".."';


if $*DISTRO.name !~~ any(<MSWin32 NetWare symbian os2 dos>) {
if $*DISTRO.name !~~ any(<mswin32 netware symbian os2 dos>) {
skip_rest 'Win32ish on-platform tests'
}
else {
Expand Down

0 comments on commit a6f3a8b

Please sign in to comment.