summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-02 10:06:37 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-02 10:06:37 +0000
commit2afd7d8ec8fc4ff46d0a672736d091ff66ec22c6 (patch)
tree9732c68ade1db8b5d7e633f7dc7697481d42da42 /t
parent5461259206276a3618e115d5d68776273bb41ca6 (diff)
downloadperl-2afd7d8ec8fc4ff46d0a672736d091ff66ec22c6.tar.gz
More heuristics to make warnings.t pass under different
combinations of PERL_UNICODE / locale p4raw-id: //depot/perl@29184
Diffstat (limited to 't')
-rw-r--r--t/lib/common.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/lib/common.pl b/t/lib/common.pl
index 6dad282a61..e188ab8d67 100644
--- a/t/lib/common.pl
+++ b/t/lib/common.pl
@@ -58,7 +58,11 @@ undef $/;
plan tests => (scalar(@prgs)-$files);
-my $utf8_ok = exists $ENV{PERL_UNICODE} && $ENV{PERL_UNICODE} =~ m{^$|[Dio]} ? 1 : 0;
+my $utf8_ok = exists $ENV{PERL_UNICODE} && (
+ $ENV{PERL_UNICODE} =~ m{[Dio]}
+ || ($ENV{PERL_UNICODE} eq ""
+ && ($ENV{LC_ALL} =~ /\butf-?8\b/i || $ENV{LANG} =~ /\butf-?8\b/i))
+);
for (@prgs){
unless (/\n/)