summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-11-12 14:35:33 -0500
committerAbhijit Menon-Sen <ams@wiw.org>2001-11-12 23:54:00 +0000
commitba553610b80f19edb980ef813a96b79c7b82f9fb (patch)
tree1ff8790a796ce51dbb3f9966ecb7256afb730fbd /ext
parent062fc4b49fd93d15ed31f92c13a0423017410c79 (diff)
downloadperl-ba553610b80f19edb980ef813a96b79c7b82f9fb.tar.gz
Recoving dup tests for VMS
Message-Id: <20011112193533.D2888@blackrider> p4raw-id: //depot/perl@12960
Diffstat (limited to 'ext')
-rwxr-xr-xext/IO/lib/IO/t/io_dup.t17
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;