From ba553610b80f19edb980ef813a96b79c7b82f9fb Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Mon, 12 Nov 2001 14:35:33 -0500 Subject: Recoving dup tests for VMS Message-Id: <20011112193533.D2888@blackrider> p4raw-id: //depot/perl@12960 --- ext/IO/lib/IO/t/io_dup.t | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'ext') 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; -- cgit v1.2.1