From: Eric Brine Date: Mon, 18 Jan 2010 04:44:14 +0000 (-0800) Subject: Add TODO test for RT#72016 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb5bc4969d327481d130990eb06757413584aa24;p=p5sagit%2Fp5-mst-13.2.git Add TODO test for RT#72016 --- diff --git a/ext/IPC-Open3/t/IPC-Open3.t b/ext/IPC-Open3/t/IPC-Open3.t index 79d5ced..849b0ba 100644 --- a/ext/IPC-Open3/t/IPC-Open3.t +++ b/ext/IPC-Open3/t/IPC-Open3.t @@ -47,7 +47,7 @@ my ($pid, $reaped_pid); STDOUT->autoflush; STDERR->autoflush; -print "1..22\n"; +print "1..23\n"; # basic ok 1, $pid = open3 'WRITE', 'READ', 'ERROR', $perl, '-e', cmd_line(<<'EOF'); @@ -146,3 +146,25 @@ else { print WRITE "ok 22\n"; waitpid $pid, 0; } + +# RT 72016 +eval{$pid = open3 'WRITE', 'READ', 'ERROR', '/non/existant/program'; }; +if (IPC::Open3::DO_SPAWN) { + if ($@ || waitpid($pid, 0) > 0) { + print "ok 23\n"; + } else { + print "not ok 23\n"; + } +} else { + if ($@) { + # exec failure should throw exception in parent. + print "ok 23 # TODO RT 72016\n"; + } else { + if (waitpid($pid, 0) > 0) { + # exec failure currently appears as child error. + print "not ok 23 # TODO RT 72016\n"; + } else { + print "not ok 23\n"; + } + } +}