BEGIN {
chdir 't' if -d 't';
unshift @INC, '../lib';
+ unshift @INC, '.';
require Config; import Config;
if (!$Config{d_setlocale} || $Config{ccflags} =~ /\bD?NO_LOCALE\b/) {
print "1..0\n";
}
use strict;
-no utf8;
my $debug = 1;
# and mingw32 uses said silly CRT
$have_setlocale = 0 if $^O eq 'MSWin32' && $Config{cc} =~ /^(cl|gcc)/i;
-print "1..", ($have_setlocale ? 115 : 98), "\n";
+print "1..", ($have_setlocale ? 116 : 98), "\n";
use vars qw(&LC_ALL);
check_taint 8, lcfirst($a);
check_taint 9, "\l$a";
-check_taint 10, sprintf('%e', 123.456);
-check_taint 11, sprintf('%f', 123.456);
-check_taint 12, sprintf('%g', 123.456);
+check_taint_not 10, sprintf('%e', 123.456);
+check_taint_not 11, sprintf('%f', 123.456);
+check_taint_not 12, sprintf('%g', 123.456);
check_taint_not 13, sprintf('%d', 123.456);
check_taint_not 14, sprintf('%x', 123.456);
Arabic:ar:dz eg sa:6 arabic8
Brezhoneg Breton:br:fr:1 15
Bulgarski Bulgarian:bg:bg:5
-Català Catalan:ca:es:1 15
Chinese:zh:cn tw:cn.EUC eucCN eucTW euc.CN euc.TW GB2312 tw.EUC
Hrvatski Croatian:hr:hr:2
Cymraeg Welsh:cy:cy:1 14 15
Eesti Estonian:et:ee:4 6 13
Suomi Finnish:fi:fi:1 15
Flamish::fl:1 15
-Français French:fr:be ca ch fr lu:1 15
Deutsch German:de:at be ch de lu:1 15
Euskaraz Basque:eu:es fr:1 15
-Gáidhlig Gaelic:gd:gb uk:1 14 15
Galego Galician:gl:es:1 15
Ellada Greek:el:gr:7 g8
-Føroyskt Faroese:fo:fo:1 15
Frysk:fy:nl:1 15
Greenlandic:kl:gl:4 6
Hebrew:iw:il:8 hebrew8
Hungarian:hu:hu:2
-Íslensku Icelandic:is:is:1 15
Indonesian:in:id:1 15
Gaeilge Irish:ga:IE:1 14 15
Italiano Italian:it:ch it:1 15
Nihongo Japanese:ja:jp:euc eucJP jp.EUC sjis
Korean:ko:kr:
-Sámi Lappish:::4 6 13
Latine Latin:la:va:1 15
Latvian:lv:lv:4 6 13
Lithuanian:lt:lt:4 6 13
Norsk Norwegian:no:no:1 15
Occitan:oc:es:1 15
Polski Polish:pl:pl:2
-Português Portuguese:po:po br:1 15
Rumanian:ro:ro:2
Russki Russian:ru:ru su ua:5 koi8 koi8r koi8u cp1251
Serbski Serbian:sr:yu:5
Slovak:sk:sk:2
Slovene Slovenian:sl:si:2
-Espanõl Spanish:es:ar bo cl co cr do ec es gt hn mx ni pa pe py sv uy ve:1 15
Sqhip Albanian:sq:sq:1 15
Svenska Swedish:sv:fi se:1 15
Thai:th:th:11 tis620
Yiddish:::1 15
EOF
+if ($^O eq 'os390') {
+ $locales =~ s/Svenska Swedish:sv:fi se:1 15\n//;
+ $locales =~ s/Thai:th:th:11 tis620\n//;
+}
+
+sub in_utf8 () { $^H & 0x08 }
+
+if (in_utf8) {
+ require "pragma/locale/utf8";
+} else {
+ require "pragma/locale/latin1";
+}
+
my @Locale;
my $Locale;
my @Alnum_;
push @enc, $_;
}
}
+ if ($^O eq 'os390') {
+ push @enc, qw(IBM-037 IBM-819 IBM-1047);
+ }
return @enc;
}
my %Okay;
my %Testing;
my @Neoalpha;
+my %Neoalpha;
sub tryneoalpha {
my ($Locale, $i, $test) = @_;
@Neoalpha = ();
for (keys %UPPER, keys %lower) {
push(@Neoalpha, $_) if (/\W/);
+ $Neoalpha{$_} = $_;
}
}
lcA($x, $y) == 1 && lcB($x, $y) == 1 ||
lcA($x, $z) == 0 && lcB($x, $z) == 0);
}
+
+ debug "# testing 116 with locale '$Locale'\n";
+ {
+ use locale;
+
+ my @f = ();
+ foreach my $x (keys %UPPER) {
+ my $y = lc $x;
+ next unless uc $y eq $x;
+ push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ }
+ foreach my $x (keys %lower) {
+ my $y = uc $x;
+ next unless lc $y eq $x;
+ push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ }
+ tryneoalpha($Locale, 116, @f == 0);
+ print "# testing 116 failed for locale '$Locale' for characters @f\n"
+ if @f;
+ }
}
# Recount the errors.
-foreach (99..115) {
+foreach (99..116) {
if ($Problem{$_} || !defined $Okay{$_} || !@{$Okay{$_}}) {
if ($_ == 102) {
print "# The failure of test 102 is not necessarily fatal.\n";
my $didwarn = 0;
-foreach (99..115) {
+foreach (99..116) {
if ($Problem{$_}) {
my @f = sort keys %{ $Problem{$_} };
my $f = join(" ", @f);