From d3934150d6fef1ce90ac44298e58474913028d32 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 25 Feb 2021 10:11:05 +0000 Subject: test_common: io_modes: always support read/write This avoids warnings when redirecting STDIN to a scalarref via run_script(). --- lib/PublicInbox/TestCommon.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index fc32b57f..af1b2e4f 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -155,8 +155,8 @@ sub key2script ($) { 'blib/script/'.$key; } -my @io_mode = ([ *STDIN{IO}, '<&' ], [ *STDOUT{IO}, '>&' ], - [ *STDERR{IO}, '>&' ]); +my @io_mode = ([ *STDIN{IO}, '+<&' ], [ *STDOUT{IO}, '+>&' ], + [ *STDERR{IO}, '+>&' ]); sub _prepare_redirects ($) { my ($fhref) = @_; -- cgit v1.2.3-24-ge0c7