summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJohn E. Malmberg <wb8tyw@qsl.net>2005-08-10 19:26:03 -0400
committerH.Merijn Brand <h.m.brand@xs4all.nl>2005-08-11 07:35:27 +0000
commit16ed468695c21630f18883bfbedc3d5170ddc8b2 (patch)
treedc0fb151b14d61b21fd69a495a06aee634f4f01a /t
parent6cd63c21c135f707c2046a8512b70b74c3e1000c (diff)
downloadperl-16ed468695c21630f18883bfbedc3d5170ddc8b2.tar.gz
[patch] blead@25282 - VMS specific fixes. [2nd try]
From: "John E. Malmberg" <wb8tyw@qsl.net> Message-ID: <42FAC54B.2050207@qsl.net> p4raw-id: //depot/perl@25284
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/doio4
-rwxr-xr-xt/op/anonsub.t2
-rw-r--r--t/op/chdir.t4
-rwxr-xr-xt/op/closure.t2
-rwxr-xr-xt/op/lex_assign.t2
-rwxr-xr-xt/op/runlevel.t2
-rwxr-xr-xt/op/stat.t12
-rw-r--r--t/pod/find.t1
-rwxr-xr-xt/x2p/s2p.t2
9 files changed, 25 insertions, 6 deletions
diff --git a/t/lib/warnings/doio b/t/lib/warnings/doio
index a4518460b4..a7165ada68 100644
--- a/t/lib/warnings/doio
+++ b/t/lib/warnings/doio
@@ -60,10 +60,10 @@
__END__
# doio.c [Perl_do_open9]
use warnings 'io' ;
-open(F, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(F, '|'."$^X -e 1|");
close(F);
no warnings 'io' ;
-open(G, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|");
+open(G, '|'."$^X -e 1|");
close(G);
EXPECT
Can't open bidirectional pipe at - line 3.
diff --git a/t/op/anonsub.t b/t/op/anonsub.t
index ddfcd4795d..970440be94 100755
--- a/t/op/anonsub.t
+++ b/t/op/anonsub.t
@@ -32,7 +32,7 @@ for (@prgs){
print TEST "$prog\n";
close TEST or die "Could not close: $!";
my $results = $Is_VMS ?
- `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
+ `$^X "-I[-.lib]" $switch $tmpfile 2>&1` :
$Is_MSWin32 ?
`.\\perl -I../lib $switch $tmpfile 2>&1` :
$Is_MacOS ?
diff --git a/t/op/chdir.t b/t/op/chdir.t
index 3a00df25ae..cb24da86c6 100644
--- a/t/op/chdir.t
+++ b/t/op/chdir.t
@@ -138,6 +138,10 @@ END {
# Restore the environment for VMS (and doesn't hurt for anyone else)
@ENV{@magic_envs} = @Saved_Env{@magic_envs};
+
+ # On VMS this must be deleted or process table is wrong on exit
+ # when this script is run interactively.
+ delete $ENV{'SYS$LOGIN'} if $IsVMS;
}
diff --git a/t/op/closure.t b/t/op/closure.t
index 574656b304..78087a0cf8 100755
--- a/t/op/closure.t
+++ b/t/op/closure.t
@@ -466,7 +466,7 @@ END
my $errfile = "terr$$"; $errfile++ while -e $errfile;
my @tmpfiles = ($cmdfile, $errfile);
open CMD, ">$cmdfile"; print CMD $code; close CMD;
- my $cmd = (($^O eq 'VMS') ? "MCR $^X"
+ my $cmd = (($^O eq 'VMS') ? "$^X"
: ($^O eq 'MSWin32') ? '.\perl'
: ($^O eq 'MacOS') ? $^X
: ($^O eq 'NetWare') ? 'perl'
diff --git a/t/op/lex_assign.t b/t/op/lex_assign.t
index 59d422e38f..c6c424d26e 100755
--- a/t/op/lex_assign.t
+++ b/t/op/lex_assign.t
@@ -8,7 +8,7 @@ BEGIN {
$| = 1;
umask 0;
$xref = \ "";
-$runme = ($^O eq 'VMS' ? 'MCR ' : '') . $^X;
+$runme = $^X;
@a = (1..5);
%h = (1..6);
$aref = \@a;
diff --git a/t/op/runlevel.t b/t/op/runlevel.t
index 531b862fd8..36c63effac 100755
--- a/t/op/runlevel.t
+++ b/t/op/runlevel.t
@@ -34,7 +34,7 @@ for (@prgs){
print TEST "$prog\n";
close TEST or die "Could not close: $!";
my $results = $Is_VMS ?
- `MCR $^X "-I[-.lib]" $switch $tmpfile 2>&1` :
+ `$^X "-I[-.lib]" $switch $tmpfile 2>&1` :
$Is_MSWin32 ?
`.\\perl -I../lib $switch $tmpfile 2>&1` :
$Is_NetWare ?
diff --git a/t/op/stat.t b/t/op/stat.t
index 924c5f40af..6eb5c9a0c4 100755
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -49,6 +49,8 @@ close FOO;
open(FOO, ">$tmpfile") || DIE("Can't open temp test file: $!");
my($nlink, $mtime, $ctime) = (stat(FOO))[$NLINK, $MTIME, $CTIME];
+
+#VMS Fix-me: nlink should work on VMS if applicable link support configured.
SKIP: {
skip "No link count", 1 if $Is_VMS;
@@ -212,6 +214,16 @@ SKIP: {
skip "Skipping: unexpected ls output in MP-RAS", 6
if $Is_MPRAS;
+ # VMS problem: If GNV or other UNIX like tool is installed, then
+ # sometimes Perl will find /bin/ls, and will try to run it.
+ # But since Perl on VMS does not know to run it under Bash, it will
+ # try to run the DCL verb LS. And if the VMS product Language
+ # Sensitive Editor is installed, or some other LS verb, that will
+ # be run instead. So do not do this until we can teach Perl
+ # when to use BASH on VMS.
+ skip "ls command not available to Perl in OpenVMS right now.", 6
+ if $Is_VMS;
+
my $LS = $Config{d_readlink} ? "ls -lL" : "ls -l";
my $CMD = "$LS /dev 2>/dev/null";
my $DEV = qx($CMD);
diff --git a/t/pod/find.t b/t/pod/find.t
index 7f8476d2d8..20586014f1 100644
--- a/t/pod/find.t
+++ b/t/pod/find.t
@@ -88,6 +88,7 @@ print "### found $result\n";
require Config;
if ($^O eq 'VMS') { # privlib is perl_root:[lib] OK but not under mms
+ $result = VMS::Filespec::vmsify($result); #if you want VMS you need to force it.
$compare = "lib.File]Find.pm";
$result =~ s/perl_root:\[\-?\.?//i;
$result =~ s/\[\-?\.?//i; # needed under `mms test`
diff --git a/t/x2p/s2p.t b/t/x2p/s2p.t
index 39c6cd8055..85df3648ab 100755
--- a/t/x2p/s2p.t
+++ b/t/x2p/s2p.t
@@ -791,6 +791,8 @@ my $s2p = File::Spec->catfile( File::Spec->updir(), 'x2p', 's2p' );
my $psed = File::Spec->catfile( File::Spec->curdir(), 'psed' );
if ($^O eq 'VMS') {
# default in the .com extenson if it's not already there
+ $s2p = VMS::Filespec::vmsify($s2p);
+ $psed = VMS::Filespec::vmsify($psed);
$s2p = VMS::Filespec::rmsexpand($s2p, '.com');
$psed = VMS::Filespec::rmsexpand($psed, '.com');
}