X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fincfilter.t;h=f796275f0bccc683234a169a45e7af64b6c06e55;hb=21fa6956243df9cb622bebfa0934ea7923519b4f;hp=0535b7641cdc74b21c91b4ba89bd5953643c8692;hpb=16d5c2f8b1cda0f138e42178a21cad8ee16e6a20;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/incfilter.t b/t/op/incfilter.t index 0535b76..f796275 100644 --- a/t/op/incfilter.t +++ b/t/op/incfilter.t @@ -5,6 +5,10 @@ BEGIN { chdir 't' if -d 't'; @INC = qw(. ../lib); + if ($ENV{PERL_CORE_MINITEST}) { + print "1..0 # Skip: no dynamic loading on miniperl\n"; + exit 0; + } unless (find PerlIO::Layer 'perlio') { print "1..0 # Skip: not perlio\n"; exit 0; @@ -68,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;