X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Flib.t;h=41280eee398a823b1002d30af563a59cd19a19c8;hb=d5201bd266fe42b2df8b480183c08be291a1ad06;hp=9a86ac7424dba8865b18fb91180ef39a4e574ce2;hpb=83943eac2433a9cd52f114532df2a61529f109a2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/lib.t b/lib/lib.t index 9a86ac7..41280ee 100644 --- a/lib/lib.t +++ b/lib/lib.t @@ -51,13 +51,25 @@ use lib $Lib_Dir; BEGIN { use_ok('Yup') } BEGIN { + if ($^O eq 'MacOS') { + for ($Lib_Dir, $Arch_Dir) { + tr|/|:|; + $_ .= ":" unless /:$/; + $_ = ":$_" unless /^:/; # we know this path is relative + } + } is( $INC[1], $Lib_Dir, 'lib adding at end of @INC' ); print "# \@INC == @INC\n"; is( $INC[0], $Arch_Dir, ' auto/ dir in front of that' ); is( grep(/^\Q$Lib_Dir\E$/, @INC), 1, ' no duplicates' ); # Yes, %INC uses Unixy filepaths. - is( $INC{'Yup.pm'}, join("/",$Lib_Dir, 'Yup.pm'), '%INC set properly' ); + # Not on Mac OS, it doesn't ... it never has, at least. + my $path = join("/",$Lib_Dir, 'Yup.pm'); + if ($^O eq 'MacOS') { + $path = $Lib_Dir . 'Yup.pm'; + } + is( $INC{'Yup.pm'}, $path, '%INC set properly' ); is( eval { do 'Yup.pm' }, 42, 'do() works' ); ok( eval { require Yup; }, ' require()' );