summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-02-04 21:50:02 +0000
committerNicholas Clark <nick@ccl4.org>2011-02-06 08:24:19 +0000
commita12c50118877afd878319fe7ee5bbfaedac7afce (patch)
tree88dc30c01573e78e5f4cb199ec0fc50f6988287f /ext
parentad01be2b63e28bdd8e5e9c5e2a377f0391d5411d (diff)
downloadperl-a12c50118877afd878319fe7ee5bbfaedac7afce.tar.gz
In IPC::Open3's fd.t, correct the code added in 1f563db471aa8a00.
C<q_Pie_> is not the same as C<q _Pie_> - the former is a bareword starting with q, the latter a quoting operator. This error was hidden by the code added in 45a1ce9706434aec to make the test "more forgiving of random stderr output". Correct the description - fd 1 is STDOUT, not STDIN. Win32 currently spits out a "Use of uninitialized value" warning, which we need to take into account when checking that no error messages have been seen.
Diffstat (limited to 'ext')
-rw-r--r--ext/IPC-Open3/t/fd.t15
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/IPC-Open3/t/fd.t b/ext/IPC-Open3/t/fd.t
index a11c72a80f..00685762c9 100644
--- a/ext/IPC-Open3/t/fd.t
+++ b/ext/IPC-Open3/t/fd.t
@@ -10,16 +10,23 @@ BEGIN {
use strict;
use warnings;
-plan 1;
+plan 2;
# [perl #76474]
{
my $stderr = runperl(
switches => ['-MIPC::Open3', '-w'],
- prog => 'open3(q _<&1_, my $out, undef, $ENV{PERLEXE}, q_-e0_)',
+ prog => 'open3(q _<&1_, my $out, undef, $ENV{PERLEXE}, q _-e0_)',
stderr => 1,
stdin => '',
);
- unlike $stderr, qr/open3/,
- "dup STDIN in a child process by using its file descriptor";
+ {
+ local $::TODO = "Bogus warning in IPC::Open3::spawn_with_handles"
+ if $^O eq 'MSWin32';
+ $stderr =~ s/(Use of uninitialized value.*Open3\.pm line \d+\.)\n//;
+ is($1, undef, 'No bogus warning found');
+ }
+
+ is $stderr, '',
+ "dup STDOUT in a child process by using its file descriptor";
}