diff options
author | Eric Brine <ikegami@adaelis.com> | 2010-01-17 20:44:14 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-04-15 16:45:56 +0200 |
commit | bb5bc4969d327481d130990eb06757413584aa24 (patch) | |
tree | f3b87d71242748851bd197435c8f10a4c80392ae /ext/IPC-Open3 | |
parent | 30b05491367d1fecbb231575d1112420d410cafb (diff) | |
download | perl-bb5bc4969d327481d130990eb06757413584aa24.tar.gz |
Add TODO test for RT#72016
Diffstat (limited to 'ext/IPC-Open3')
-rw-r--r-- | ext/IPC-Open3/t/IPC-Open3.t | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/ext/IPC-Open3/t/IPC-Open3.t b/ext/IPC-Open3/t/IPC-Open3.t index 79d5cedde5..849b0baa2e 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"; + } + } +} |