From: Craig A. Berry Date: Wed, 13 Aug 2008 03:10:16 +0000 (+0000) Subject: VMS-specific follow-up to tempfile name changes in 34182, plus X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7aa55bb4d7409fae441c5fde09543172f4df350d;p=p5sagit%2Fp5-mst-13.2.git VMS-specific follow-up to tempfile name changes in 34182, plus a TODO in dup.t that's long since to-done. p4raw-id: //depot/perl@34203 --- diff --git a/t/io/dup.t b/t/io/dup.t index 18277d9..ac2f3f4 100755 --- a/t/io/dup.t +++ b/t/io/dup.t @@ -38,19 +38,12 @@ $cmd = sprintf "$echo 1>&2", 5; $cmd = sprintf $echo, 5 if $^O eq 'MacOS'; # don't know if we can do this ... print `$cmd`; -# KNOWN BUG system() does not honor STDOUT redirections on VMS. -if( $^O eq 'VMS' ) { - print "not ok $_ # TODO system() not honoring STDOUT redirect on VMS\n" - for 6..7; +system sprintf $echo, 6; +if ($^O eq 'MacOS') { + system sprintf $echo, 7; } else { - system sprintf $echo, 6; - if ($^O eq 'MacOS') { - system sprintf $echo, 7; - } - else { - system sprintf "$echo 1>&2", 7; - } + system sprintf "$echo 1>&2", 7; } close(STDOUT) or die "Could not close: $!"; @@ -59,7 +52,8 @@ close(STDERR) or die "Could not close: $!"; open(STDOUT,">&DUPOUT") or die "Could not open: $!"; open(STDERR,">&DUPERR") or die "Could not open: $!"; -if (($^O eq 'MSWin32') || ($^O eq 'NetWare') || ($^O eq 'VMS')) { print `type $tempfile` } +if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) { print `type $tempfile` } +elsif ($^O eq 'VMS') { system "type $tempfile.;" } # TYPE defaults to .LIS when there is no extension elsif ($^O eq 'MacOS') { system "catenate $tempfile" } else { system "cat $tempfile" } diff --git a/t/io/fs.t b/t/io/fs.t index 095239b..cd8bd55 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -437,7 +437,7 @@ SKIP: { if ($^O eq 'VMS') { # must have delete access to rename a directory `set file $tmpdir.dir/protection=o:d`; - ok(rename('$tmpdir.dir', '$tmpdir1.dir'), "rename on directories") || + ok(rename("$tmpdir.dir", "$tmpdir1.dir"), "rename on directories") || print "# errno: $!\n"; } else { diff --git a/t/op/runlevel.t b/t/op/runlevel.t index c103812..44aedc0 100755 --- a/t/op/runlevel.t +++ b/t/op/runlevel.t @@ -44,7 +44,7 @@ for (@prgs){ my $status = $?; $results =~ s/\n+$//; # allow expected output to be written as if $prog is on STDIN - $results =~ s/$::tempfile_regexp/-/g; + $results =~ s/$::tempfile_regexp/-/ig; $results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS; # clip off DCL status msg $expected =~ s/\n+$//; if ($results ne $expected) {