$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: $!";
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" }
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 {
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) {