]> Sergey Matveev's repositories - public-inbox.git/commitdiff
test_common: io_modes: always support read/write
authorEric Wong <e@80x24.org>
Thu, 25 Feb 2021 10:11:05 +0000 (10:11 +0000)
committerEric Wong <e@80x24.org>
Fri, 26 Feb 2021 02:35:50 +0000 (02:35 +0000)
This avoids warnings when redirecting STDIN to a scalarref
via run_script().

lib/PublicInbox/TestCommon.pm

index fc32b57fe92fc7d93ed79f2e38ecf58f0f093738..af1b2e4f63ef0d964bdb9d268eae3422cbb6931f 100644 (file)
@@ -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) = @_;