summaryrefslogtreecommitdiff
path: root/t/pragma
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-28 16:58:11 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-28 16:58:11 +0000
commit3ba0e062b0fe667e151870a45d4ee2ea831cfb50 (patch)
treef6b4faaa4299b13bf5222e030e8d0f9dc82d7cf0 /t/pragma
parent1115139db3eaa371c914ed4ef12a3a4846e77705 (diff)
downloadperl-3ba0e062b0fe667e151870a45d4ee2ea831cfb50.tar.gz
Various buglets shaken out by -Mutf8.
p4raw-id: //depot/perl@10260
Diffstat (limited to 't/pragma')
-rwxr-xr-xt/pragma/locale.t48
1 files changed, 19 insertions, 29 deletions
diff --git a/t/pragma/locale.t b/t/pragma/locale.t
index 068fedeac8..ecbd80e775 100755
--- a/t/pragma/locale.t
+++ b/t/pragma/locale.t
@@ -424,8 +424,6 @@ if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a 2>/dev/null|")) {
setlocale(LC_ALL, "C");
-sub utf8locale { $_[0] =~ /utf-?8/i }
-
@Locale = sort @Locale;
debug "# Locales = @Locale\n";
@@ -514,16 +512,11 @@ foreach $Locale (@Locale) {
# Test \w.
- if (utf8locale($Locale)) {
- # Until the polymorphic regexen arrive.
- debug "# skipping UTF-8 locale '$Locale'\n";
- } else {
- my $word = join('', @Neoalpha);
+ my $word = join('', @Neoalpha);
- $word =~ /^(\w+)$/;
+ $word =~ /^(\w+)$/;
- tryneoalpha($Locale, 99, $1 eq $word);
- }
+ tryneoalpha($Locale, 99, $1 eq $word);
# Cross-check the whole 8-bit character set.
@@ -697,29 +690,26 @@ foreach $Locale (@Locale) {
# Does lc of an UPPER (if different from the UPPER) match
# case-insensitively the UPPER, and does the UPPER match
# case-insensitively the lc of the UPPER. And vice versa.
- if (utf8locale($Locale)) {
- # Until the polymorphic regexen arrive.
- debug "# skipping UTF-8 locale '$Locale'\n";
- } else {
- 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);
+ {
+ use locale;
+ no utf8; # so that the native 8-bit characters work
+
+ 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);
if (@f) {
print "# failed 116 locale '$Locale' characters @f\n"
}
}
-
}
# Recount the errors.