that show up in the smokes under UTF-8 locales. Based on :
Subject: Re: UTF-8 Failures in smoke ($PERL_UNICODE)
From: "H.Merijn Brand" <h.m.brand@xs4all.nl>
Message-ID: <
20061101170355.7c57b515@pc09>
p4raw-id: //depot/perl@29182
plan tests => (scalar(@prgs)-$files);
-
+my $utf8_ok = exists $ENV{PERL_UNICODE} && $ENV{PERL_UNICODE} =~ m{^$|[Dio]} ? 1 : 0;
for (@prgs){
unless (/\n/)
$switch = $&;
}
my($prog,$expected) = split(/\nEXPECT(?:\n|$)/, $_, 2);
+ $expected =~ s{\b
+ UTF8 \s*
+ \? \s* '(.*?)'
+ : \s* '(.*?)'
+ }{$utf8_ok?$1:$2}gexs;
+
my ($todo, $todo_reason);
$todo = $prog =~ s/^#\s*TODO(.*)\n//m and $todo_reason = $1;
if ( $prog =~ /--FILE--/) {
EXPECT
Use of uninitialized value $_ in eval "string" at - line 4.
Use of uninitialized value $_ in eval "string" at - line 4.
-Use of uninitialized value $_ in eval "string" at - line 4.
-Use of uninitialized value $m1 in eval "string" at - line 5.
+Use of uninitialized value UTF8?'':'$_ 'in eval "string" at - line 4.
Use of uninitialized value $m1 in eval "string" at - line 5.
Use of uninitialized value $m1 in eval "string" at - line 5.
+Use of uninitialized value UTF8?'':'$m1 'in eval "string" at - line 5.
########
use warnings 'uninitialized';
my ($m1);