From: Nick Ing-Simmons Date: Fri, 31 May 2002 08:48:40 +0000 (+0000) Subject: Use File::Spec for blib expectance tests - skating round X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=91fded4130499bff6f2b2497d4307e4f99abae89;p=p5sagit%2Fp5-mst-13.2.git Use File::Spec for blib expectance tests - skating round existing MacOS and VMS hacks. p4raw-id: //depot/perlio@16920 --- diff --git a/lib/blib.t b/lib/blib.t index f5e3241..b6df9e8 100644 --- a/lib/blib.t +++ b/lib/blib.t @@ -6,6 +6,7 @@ BEGIN { } use strict; +use File::Spec; my($blib, $blib_arch, $blib_lib, @blib_dirs); sub _cleanup { @@ -51,7 +52,7 @@ _mkdirs( @blib_dirs ); my $warnings = ''; local $SIG{__WARN__} = sub { $warnings = join '', @_ }; use_ok('blib'); - is( $warnings, '', 'use blib is niiiice and quiet' ); + is( $warnings, '', 'use blib is nice and quiet' ); } is( @INC, 3, '@INC now has 3 elements' ); @@ -59,10 +60,18 @@ is( $INC[2], '../lib', 'blib added to the front of @INC' ); if ($^O eq 'VMS') { # Unix syntax is accepted going in but it's not what comes out + # So we don't use catdir above $blib_arch = 'blib.arch]'; $blib_lib = 'blib.lib]'; } -ok( grep(m|\Q$blib_lib\E$|, @INC[0,1]) == 1, ' blib/lib in @INC'); -ok( grep(m|\Q$blib_arch\E$|, @INC[0,1]) == 1, ' blib/arch in @INC'); +elsif ($^O ne 'MacOS') +{ + $blib_arch = File::Spec->catdir("blib","arch"); + $blib_lib = File::Spec->catdir("blib","lib"); +} + + +ok( grep(m|\Q$blib_lib\E$|, @INC[0,1]) == 1, " $blib_lib in \@INC"); +ok( grep(m|\Q$blib_arch\E$|, @INC[0,1]) == 1, " $blib_arch in \@INC"); END { _cleanup( @blib_dirs ); }