Craig A . Berry
2007-08-16 17:15:02 UTC
Change 31726 by ***@craigb-brianor on 2007/08/16 17:05:48
Subject: [***@31706]01_module_load_conditional.t fix for VMS
From: "John E. Malmberg" <***@qsl.net>
Date: Thu, 16 Aug 2007 00:27:35 -0500
Message-id: <***@qsl.net>
Affected files ...
... //depot/perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t#5 edit
Differences ...
==== //depot/perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t#5 (text) ====
Index: perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t
--- perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t#4~29989~ 2007-01-26 00:27:23.000000000 -0800
+++ perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t 2007-08-16 10:05:48.000000000 -0700
@@ -43,8 +43,24 @@
ok( $rv->{version} == $Module::Load::Conditional::VERSION,
q[ Found proper version] );
+ # This test is expecting the file to in UNIX format, so force
+ $rv->{file} = VMS::Filespec::unixify($rv->{file}) if $^O eq 'VMS';
+
+ # break up the specification
+ my @rv_path;
+ if ($^O eq 'VMS') {
+ # Use the UNIX specific method, as the VMS one currently
+ # converts the file spec back to VMS format.
+ @rv_path = File::Spec::Unix->splitpath($rv->{file});
+ } else {
+ @rv_path = File::Spec->splitpath($rv->{file});
+ }
+
+ # First element could be blank for some system types like VMS
+ shift @rv_path if $rv_path[0] eq '';
+
ok( $INC{'Module/Load/Conditional.pm'} eq
- File::Spec::Unix->catfile(File::Spec->splitdir($rv->{file}) ),
+ File::Spec::Unix->catfile(@rv_path),
q[ Found proper file]
);
@@ -152,6 +168,7 @@
{ package A::B::C::D;
$A::B::C::D::VERSION = $$;
$INC{'A/B/C/D.pm'} = $$.$$;
+ $INC{'[.A.B.C]D.pm'} = $$.$$ if $^O eq 'VMS';
}
my $href = check_install( module => 'A::B::C::D', version => 0 );
@@ -164,4 +181,3 @@
' can_load successful' );
}
-
End of Patch.
Subject: [***@31706]01_module_load_conditional.t fix for VMS
From: "John E. Malmberg" <***@qsl.net>
Date: Thu, 16 Aug 2007 00:27:35 -0500
Message-id: <***@qsl.net>
Affected files ...
... //depot/perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t#5 edit
Differences ...
==== //depot/perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t#5 (text) ====
Index: perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t
--- perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t#4~29989~ 2007-01-26 00:27:23.000000000 -0800
+++ perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t 2007-08-16 10:05:48.000000000 -0700
@@ -43,8 +43,24 @@
ok( $rv->{version} == $Module::Load::Conditional::VERSION,
q[ Found proper version] );
+ # This test is expecting the file to in UNIX format, so force
+ $rv->{file} = VMS::Filespec::unixify($rv->{file}) if $^O eq 'VMS';
+
+ # break up the specification
+ my @rv_path;
+ if ($^O eq 'VMS') {
+ # Use the UNIX specific method, as the VMS one currently
+ # converts the file spec back to VMS format.
+ @rv_path = File::Spec::Unix->splitpath($rv->{file});
+ } else {
+ @rv_path = File::Spec->splitpath($rv->{file});
+ }
+
+ # First element could be blank for some system types like VMS
+ shift @rv_path if $rv_path[0] eq '';
+
ok( $INC{'Module/Load/Conditional.pm'} eq
- File::Spec::Unix->catfile(File::Spec->splitdir($rv->{file}) ),
+ File::Spec::Unix->catfile(@rv_path),
q[ Found proper file]
);
@@ -152,6 +168,7 @@
{ package A::B::C::D;
$A::B::C::D::VERSION = $$;
$INC{'A/B/C/D.pm'} = $$.$$;
+ $INC{'[.A.B.C]D.pm'} = $$.$$ if $^O eq 'VMS';
}
my $href = check_install( module => 'A::B::C::D', version => 0 );
@@ -164,4 +181,3 @@
' can_load successful' );
}
-
End of Patch.