This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add symlink support to Cwd::_vms_abs_path.
[perl5.git] / lib / blib.t
index f5e3241..b6df9e8 100644 (file)
@@ -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 ); }