This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/run/locale.t: Rmv duplicate closing of STDERR
authorKarl Williamson <khw@cpan.org>
Wed, 10 Dec 2014 20:08:10 +0000 (13:08 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 11 Dec 2014 18:28:29 +0000 (11:28 -0700)
STDERR is now closed during these tests, so no need to do it again.  And
if you wanted to see STDERR for some reason, you had to remember to fix
things in two places.  This also sets PERL_BADLANG to suppress some of
the things that we were closing STDERR to avoid printing.

t/run/locale.t

index 1aaeb0f..c721c2f 100644 (file)
@@ -293,9 +293,10 @@ EOF
             local $ENV{LC_ALL} = "invalid";
             local $ENV{LC_NUMERIC} = "invalid";
             local $ENV{LANG} = $different;
+            local $ENV{PERL_BADLANG} = 0;
 
             # Can't turn off the warnings, so send them to /dev/null
-            if (! fresh_perl_is(<<"EOF", "$difference", { stderr => "devnull" },
+            if (! fresh_perl_is(<<"EOF", "$difference", { },
                 if (\$ENV{LC_ALL} ne "invalid") {
                     # Make the test pass if the sh didn't accept the ENV set
                     print "$difference\n";
@@ -321,9 +322,10 @@ EOF
                 local $ENV{LC_ALL} = "invalid";
                 local $ENV{LC_NUMERIC} = "invalid";
                 local $ENV{LANG} = "invalid";
+                local $ENV{PERL_BADLANG} = 0;
 
                 # Can't turn off the warnings, so send them to /dev/null
-                if (! fresh_perl_is(<<"EOF", 4.2, { stderr => "devnull" },
+                if (! fresh_perl_is(<<"EOF", 4.2, { },
                     if (\$ENV{LC_ALL} ne "invalid") {
                         print "$difference\n";
                         exit 0;