diff options
author | Michael G. Schwern <schwern@pobox.com> | 2001-11-12 14:35:33 -0500 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2001-11-12 23:54:00 +0000 |
commit | ba553610b80f19edb980ef813a96b79c7b82f9fb (patch) | |
tree | 1ff8790a796ce51dbb3f9966ecb7256afb730fbd /ext | |
parent | 062fc4b49fd93d15ed31f92c13a0423017410c79 (diff) | |
download | perl-ba553610b80f19edb980ef813a96b79c7b82f9fb.tar.gz |
Recoving dup tests for VMS
Message-Id: <20011112193533.D2888@blackrider>
p4raw-id: //depot/perl@12960
Diffstat (limited to 'ext')
-rwxr-xr-x | ext/IO/lib/IO/t/io_dup.t | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ext/IO/lib/IO/t/io_dup.t b/ext/IO/lib/IO/t/io_dup.t index 8983a56f36..5db5ced7df 100755 --- a/ext/IO/lib/IO/t/io_dup.t +++ b/ext/IO/lib/IO/t/io_dup.t @@ -39,14 +39,15 @@ $stderr->fdopen($stdout,"w"); print $stdout "ok 2\n"; print $stderr "ok 3\n"; -if ($^O eq 'MSWin32' || $^O eq 'NetWare') { - print `echo ok 4`; - print `echo ok 5 1>&2`; # does this *really* work? -} -else { - system 'echo ok 4'; - system 'echo ok 5 1>&2'; -} + +# Since some systems don't have echo, we use Perl. +$echo = qq{$^X -le "print q{ok %d}"}; + +$cmd = sprintf $echo, 4; +print `$cmd`; + +$cmd = sprintf "$echo 1>&2", 5; +print `$cmd`; $stderr->close; $stdout->close; |