These diffs are against 5.8.7. Essentially allow these test to be run in a UNIX emulation mode.
For the 64 bit OpenVMS, what really needs to be done is that all the test scripts need to be run in the default mode, and then in a "UNIX REPORT" mode, and when the future VMS comes out with the POSIX mode, a third time.
Of course if the UNIX ONLY mode is implemented, then there will eventually be two flavors of that, POSIX and traditional.
Of course if you make a matrix of all the current possible ways that the CRTL can be told to interpret a UNIX pathname, it would take quite a large number of test runs to cover all of them, assuming that Perl and the test modes were changed to handle them also.
For now, I am sticking a bunch of features that result in pathnames by default being reported as "UNIX" format, with support for the future POSIX mode that assumes pathnames are VMS if they are ambiguous.
This is probably enough new topics for today. -John [EMAIL PROTECTED] Personal Opinion Only
--- ext/File/Glob/t/basic.t_5_8_7 Tue Jul 12 17:44:21 2005 +++ ext/File/Glob/t/basic.t Tue Jul 12 17:53:02 2005 @@ -111,20 +111,70 @@ } print "ok 7\n"; +# VMS can pretend it is UNIX. + +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 + } +} + @a = bsd_glob( '{TES*,doesntexist*,a,b}', - GLOB_BRACE | GLOB_NOMAGIC | ($^O eq 'VMS' ? GLOB_NOCASE : 0) + GLOB_BRACE | GLOB_NOMAGIC | (!(defined $case_preserved) ? GLOB_NOCASE : 0) ); # Working on t/TEST often causes this test to fail because it sees Emacs temp # and RCS files. Filter them out, and .pm files too, and patch temp files. @a = grep !/(,v$|~$|\.(pm|ori?g|rej)$)/, @a; [EMAIL PROTECTED] = (grep !/test.pl/, @a) if $^O eq 'VMS'; +if (($^O eq 'VMS') && !(defined $unix_report)) { + @a = (grep !/test.pl/, @a); +} print "# @a\n"; unless (@a == 3 - and $a[0] eq ($^O eq 'VMS'? 'test.' : 'TEST') + and $a[0] eq ($vms_format ? 'test.' : 'TEST') and $a[1] eq 'a' and $a[2] eq 'b') { @@ -150,7 +200,8 @@ if ('a' lt 'A') { # EBCDIC char sets sort lower case before UPPER @f_names = sort(@f_names); } -if ($^O eq 'VMS') { # VMS is happily caseignorant +# VMS is normally happily caseignorant +if (($^O eq 'VMS') && !(defined $case_preserved)) { @f_alpha = qw(ax.pl ay.pl bx.pl by.pl cx.pl cy.pl); @f_names = @f_alpha; }
--- ext/Posix/t/posix.t_5_8_7 Tue Jul 12 17:57:55 2005 +++ ext/Posix/t/posix.t Tue Jul 12 17:58:09 2005 @@ -28,6 +28,34 @@ $Is_UWin = $^O eq 'uwin'; $Is_OS390 = $^O eq 'os390'; +# VMS can pretend it is UNIX. +my $posix_compliant; +my $unix_report; +my $unix_only; +if ($Is_VMS) { + $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); +} + + + ok( $testfd = open("TEST", O_RDONLY, 0), 'O_RDONLY with open' ); read($testfd, $buffer, 4) if $testfd > 2; is( $buffer, "#!./", ' with read' ); @@ -128,7 +156,7 @@ if ($Is_MacOS) { $pat = qr/:t:$/; } -elsif ( $Is_VMS ) { +elsif ( $Is_VMS && !(defined $unix_report)) { $pat = qr/\.T]/i; } else {