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');
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";
+ }
+ }
+}