summaryrefslogtreecommitdiff
path: root/lib/blib.t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-05-31 08:48:40 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-05-31 08:48:40 +0000
commit91fded4130499bff6f2b2497d4307e4f99abae89 (patch)
tree2946cc7ab24511466ed49e4cf32adb7de14da9c7 /lib/blib.t
parentb705a5ea9fdd4854d4e38bf90cb9e2fada3dde80 (diff)
downloadperl-91fded4130499bff6f2b2497d4307e4f99abae89.tar.gz
Use File::Spec for blib expectance tests - skating round
existing MacOS and VMS hacks. p4raw-id: //depot/perlio@16920
Diffstat (limited to 'lib/blib.t')
-rw-r--r--lib/blib.t15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/blib.t b/lib/blib.t
index f5e32414a8..b6df9e8d2b 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 ); }