From a12c50118877afd878319fe7ee5bbfaedac7afce Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 4 Feb 2011 21:50:02 +0000 Subject: [PATCH] In IPC::Open3's fd.t, correct the code added in 1f563db471aa8a00. C is not the same as C - 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. --- ext/IPC-Open3/t/fd.t | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ext/IPC-Open3/t/fd.t b/ext/IPC-Open3/t/fd.t index a11c72a..0068576 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"; } -- 2.7.4