X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FVPIT%2FTestHelpers.pm;h=2396cade85c2812fbf0cadcf5c3a81e1b613adde;hb=6d578776b5176e59276ca1581e8ceffdfb2da760;hp=bae97851cc47e8a8ac86eed95cc9e77f56db42d0;hpb=d7e42b2c5a757b8f97751c8cfb4c14f95c6b4774;p=perl%2Fmodules%2FVPIT-TestHelpers.git diff --git a/lib/VPIT/TestHelpers.pm b/lib/VPIT/TestHelpers.pm index bae9785..2396cad 100644 --- a/lib/VPIT/TestHelpers.pm +++ b/lib/VPIT/TestHelpers.pm @@ -288,11 +288,19 @@ Dependencies : =item - -Not VMS +Neither VMS nor OS/2 =item - -L, L, L +L + +=item - + +L + +=item - + +L =item - @@ -331,7 +339,8 @@ C (possibly prefixed by C<$p>) sub init_capture { my $p = sanitize_prefix(shift); - skip_all 'Cannot capture output on VMS' if $^O eq 'VMS'; + skip_all 'Cannot capture output on VMS' if $^O eq 'VMS'; + skip_all 'Cannot capture output on OS/2' if $^O eq 'os2'; load_or_skip_all 'IO::Handle', '0', [ ]; load_or_skip_all 'IO::Select', '0', [ ]; @@ -476,6 +485,15 @@ sub capture { 1; }; + if ("$]" < 5.014 and $ok and ($status >> 8) == 255 and defined $content_err + and $content_err =~ /^open3/) { + # Before perl commit 8960aa87 (between 5.12 and 5.14), exceptions in open3 + # could be reported to STDERR instead of being propagated, so work around + # this. + $ok = 0; + $@ = $content_err; + } + if ($ok) { return ($status, $content_out, $content_err); } else {