This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
tests for [perl #76474]
authorFather Chrysostomos <sprout@cpan.org>
Sun, 26 Sep 2010 13:40:52 +0000 (06:40 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 26 Sep 2010 13:40:52 +0000 (06:40 -0700)
MANIFEST
ext/IPC-Open3/t/fd.t [new file with mode: 0644]

index a9cff35..65ceec5 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -3178,6 +3178,7 @@ ext/I18N-Langinfo/t/Langinfo.t    See whether I18N::Langinfo works
 ext/IPC-Open2/lib/IPC/Open2.pm Open a two-ended pipe
 ext/IPC-Open2/t/IPC-Open2.t    See if IPC::Open2 works
 ext/IPC-Open3/lib/IPC/Open3.pm Open a three-ended pipe
+ext/IPC-Open3/t/fd.t           See if IPC::Open3 works w/ file descriptors
 ext/IPC-Open3/t/IPC-Open3.t    See if IPC::Open3 works
 ext/mro/Changes                        mro extension
 ext/mro/mro.pm                 mro extension
diff --git a/ext/IPC-Open3/t/fd.t b/ext/IPC-Open3/t/fd.t
new file mode 100644 (file)
index 0000000..2a9aeff
--- /dev/null
@@ -0,0 +1,15 @@
+#!./perl
+
+BEGIN { require "../../t/test.pl"; }
+use strict;
+use warnings;
+
+plan 1;
+
+# [perl #76474]
+ok !runperl(
+     switches => ['-MIPC::Open3', '-w'],
+     prog => 'open3(q _<&1_, my $out, undef, $ENV{PERLEXE})',
+     stderr => 1,
+   ),
+   "dup STDIN in a child process by using its file descriptor";