From: Craig A. Berry Date: Wed, 31 May 2006 03:31:54 +0000 (+0000) Subject: Teach incfilter.t some DCL. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=baf93d00e73538072d3f3b98f9fac4f78b6b72b7;p=p5sagit%2Fp5-mst-13.2.git Teach incfilter.t some DCL. p4raw-id: //depot/perl@28340 --- diff --git a/t/op/incfilter.t b/t/op/incfilter.t index a8db411..f796275 100644 --- a/t/op/incfilter.t +++ b/t/op/incfilter.t @@ -72,11 +72,24 @@ do [$fh, sub {s/$_[1]/pass/; return;}, 'fail'] or die; print "# 2 tests with pipes from subprocesses.\n"; -open $fh, 'echo pass|' or die $!; +my ($echo_command, $pass_arg, $fail_arg); + +if ($^O eq 'VMS') { + $echo_command = 'write sys$output'; + $pass_arg = '"pass"'; + $fail_arg = '"fail"'; +} +else { + $echo_command = 'echo'; + $pass_arg = 'pass'; + $fail_arg = 'fail'; +} + +open $fh, "$echo_command $pass_arg|" or die $!; do $fh or die; -open $fh, 'echo fail|' or die $!; +open $fh, "$echo_command $fail_arg|" or die $!; do [$fh, sub {s/$_[1]/pass/; return;}, 'fail'] or die;