X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVPIT-TestHelpers.git;a=blobdiff_plain;f=lib%2FVPIT%2FTestHelpers.pm;fp=lib%2FVPIT%2FTestHelpers.pm;h=e8cfa710ea73aec55801f5f9fcdd03548cb8a3e8;hp=bae97851cc47e8a8ac86eed95cc9e77f56db42d0;hb=3edc6d15d41c3ff378ba461d7c218bc9a5c851f0;hpb=d7e42b2c5a757b8f97751c8cfb4c14f95c6b4774 diff --git a/lib/VPIT/TestHelpers.pm b/lib/VPIT/TestHelpers.pm index bae9785..e8cfa71 100644 --- a/lib/VPIT/TestHelpers.pm +++ b/lib/VPIT/TestHelpers.pm @@ -476,6 +476,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 {