autosplit.t needs an update for when VMS is operating in case preserved
mode.
blib.t can not use the VMS hack around the CATDIR when VMS CRTL is in
UNIX mode.
vmsish.t has a problem that is common to a lot of the tests.
When VMS CRTL is in UNIX mode, the program name is returned as a UNIX or
a POSIX pathname.
MCR can not deal with such pathnames unless they are converted to VMS
format first.
Note that if a routine just passes off $^X as is with arguments to Perl,
the existing Perl routines will internally convert it to VMS and then
use MCR with it.
So in many cases, all that is needed to fix the tests for VMS operating
in UNIX mode is to remove the VMS specific code that adds a "MCR " to it.
-John
[EMAIL PROTECTED]
Personal Opinion Only
--- lib/AutoSplit.t_5_8_6 Wed Apr 20 14:18:42 2005
+++ lib/AutoSplit.t Wed Apr 20 14:18:42 2005
@@ -52,6 +52,53 @@
my $pathsep = $^O eq 'MSWin32' ? '\\' : $^O eq 'MacOS' ? ':' : '/';
my $endpathsep = $^O eq 'MacOS' ? ':' : '';
+my $IsVMS = $^O eq 'VMS';
+my $posix_compliant;
+my $unix_report;
+my $unix_only;
+my $case_preserved = 1;
+my $vms_drop_dot;
+my $vms_format = 0;
+if ($IsVMS) {
+ $vms_format = 1;
+ $posix_compliant = $ENV{'DECC$POSIX_COMPLIANT_PATHNAMES'};
+ if (defined $posix_compliant) {
+ if (($posix_compliant lt '1') && ($posix_compliant ne 'ENABLE')) {
+ $posix_compliant = undef;
+ }
+ }
+ $unix_report = $ENV{'DECC$FILENAME_UNIX_REPORT'};
+ if (defined $unix_report) {
+ if (($unix_report lt '1') && ($unix_report ne 'ENABLE')) {
+ $unix_report = undef;
+ }
+ }
+ $unix_only = $ENV{'DECC$FILENAME_UNIX_ONLY'};
+ if (defined $unix_only) {
+ if (($unix_only lt '1') && ($unix_only ne 'ENABLE')) {
+ $unix_only = undef;
+ }
+ }
+ $unix_report = 1 if (defined $unix_only);
+
+ $case_preserved = $ENV{'DECC$EFS_CASE_PRESERVE'};
+ if (defined $case_preserved) {
+ if (($case_preserved lt '1') && ($case_preserved ne 'ENABLE')) {
+ $case_preserved = undef;
+ }
+ }
+ $vms_drop_dot = $ENV{'DECC$READDIR_DROPDOTNOTYPE'};
+ if (defined $vms_drop_dot) {
+ if (($vms_drop_dot lt '1') && ($vms_drop_dot ne 'ENABLE')) {
+ $vms_drop_dot = undef;
+ }
+ }
+ if ((defined $unix_report) && (defined $vms_drop_dot)) {
+ $vms_format = 0
+ }
+}
+
+
sub split_a_file {
my $contents = shift;
my $file = $_[0];
@@ -128,7 +175,7 @@
find (sub {$got{$File::Find::name}++ unless -d $_}, $dir);
foreach (split /\n/, $args{Files}) {
next if /^#/;
- $_ = lc($_) if $^O eq 'VMS';
+ $_ = lc($_) if (($^O eq 'VMS') && !(defined $case_preserved));
unless (delete $got{$_}) {
$missing{$_}++;
}
--- lib/blib.t_5_8_6 Wed Apr 20 14:23:12 2005
+++ lib/blib.t Wed Apr 20 14:23:23 2005
@@ -58,7 +58,36 @@
is( @INC, 3, '@INC now has 3 elements' );
is( $INC[2], '../lib', 'blib added to the front of @INC' );
-if ($^O eq 'VMS') {
+# VMS can pretend it is UNIX.
+
+my $IsVMS = $^O eq 'VMS';
+my $posix_compliant;
+my $unix_report;
+my $unix_only;
+if ($IsVMS) {
+ $posix_compliant = $ENV{'DECC$POSIX_COMPLIANT_PATHNAMES'};
+ if (defined $posix_compliant) {
+ if (($posix_compliant lt '1') && ($posix_compliant ne 'ENABLE')) {
+ $posix_compliant = undef;
+ }
+ }
+ $unix_report = $ENV{'DECC$FILENAME_UNIX_REPORT'};
+ if (defined $unix_report) {
+ if (($unix_report lt '1') && ($unix_report ne 'ENABLE')) {
+ $unix_report = undef;
+ }
+ }
+ $unix_only = $ENV{'DECC$FILENAME_UNIX_ONLY'};
+ if (defined $unix_only) {
+ if (($unix_only lt '1') && ($unix_only ne 'ENABLE')) {
+ $unix_only = undef;
+ }
+ }
+ $unix_report = 1 if (defined $unix_only);
+}
+
+
+if (($^O eq 'VMS') && !(defined $unix_report)) {
# Unix syntax is accepted going in but it's not what comes out
# So we don't use catdir above
$blib_arch = 'blib.arch]';
--- lib/vmsish.t_5_8_6 Thu May 12 13:55:16 2005
+++ lib/vmsish.t Thu May 12 14:05:51 2005
@@ -5,7 +5,10 @@
@INC = '../lib';
}
-my $Invoke_Perl = qq(MCR $^X "-I[-.lib]");
+my $perl = $^X;
+$perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS';
+
+my $Invoke_Perl = qq(MCR $perl "-I[-.lib]");
require "./test.pl";
plan(tests => 25);