summaryrefslogtreecommitdiff
path: root/lib/locale.t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-10-16 20:45:17 -0600
committerKarl Williamson <khw@cpan.org>2014-10-21 09:26:50 -0600
commit4d2de1058c946439368821b6622c0290c8e9f855 (patch)
tree949fb6fc9ee8eda4d1704199bf0bdb489a3d3417 /lib/locale.t
parentc46c4601920d32884d90fbc4c84b4947cb60f436 (diff)
downloadperl-4d2de1058c946439368821b6622c0290c8e9f855.tar.gz
lib/locale.t: Add some \Q
More places in this file need to have \Q to quote things. This was noticed in EBCDIC testing.
Diffstat (limited to 'lib/locale.t')
-rw-r--r--lib/locale.t24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/locale.t b/lib/locale.t
index f59e17bbd9..54dbd382c3 100644
--- a/lib/locale.t
+++ b/lib/locale.t
@@ -2075,10 +2075,10 @@ foreach my $Locale (@Locale) {
"; lc=", disp_chars(($y)), "; ",
"; fc=", disp_chars((fc $x)), "; ",
disp_chars(($x)), "=~/", disp_chars(($y)), "/i=",
- $x =~ /$y/i ? 1 : 0,
+ $x =~ /\Q$y/i ? 1 : 0,
"; ",
disp_chars(($y)), "=~/", disp_chars(($x)), "/i=",
- $y =~ /$x/i ? 1 : 0,
+ $y =~ /\Q$x/i ? 1 : 0,
"\n");
#
# If $x and $y contain regular expression characters
@@ -2108,7 +2108,7 @@ foreach my $Locale (@Locale) {
print "# Regex characters in '$x' or '$y', skipping test $locales_test_number for locale '$Locale'\n";
next;
}
- push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ push @f, $x unless $x =~ /\Q$y/i && $y =~ /\Q$x/i;
# fc is not a locale concept, so Perl uses lc for it.
push @f, $x unless lc $x eq fc $x;
@@ -2121,13 +2121,13 @@ foreach my $Locale (@Locale) {
"; lc=", disp_chars(($y)), "; ",
"; fc=", disp_chars((fc $x)), "; ",
disp_chars(($x)), "=~/", disp_chars(($y)), "/i=",
- $x =~ /$y/i ? 1 : 0,
+ $x =~ /\Q$y/i ? 1 : 0,
"; ",
disp_chars(($y)), "=~/", disp_chars(($x)), "/i=",
- $y =~ /$x/i ? 1 : 0,
+ $y =~ /\Q$x/i ? 1 : 0,
"\n");
- push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ push @f, $x unless $x =~ /\Q$y/i && $y =~ /\Q$x/i;
# The places where Unicode's lc is different from fc are
# skipped here by virtue of the 'next unless uc...' line above
@@ -2143,16 +2143,16 @@ foreach my $Locale (@Locale) {
"; uc=", disp_chars(($y)), "; ",
"; fc=", disp_chars((fc $x)), "; ",
disp_chars(($x)), "=~/", disp_chars(($y)), "/i=",
- $x =~ /$y/i ? 1 : 0,
+ $x =~ /\Q$y/i ? 1 : 0,
"; ",
disp_chars(($y)), "=~/", disp_chars(($x)), "/i=",
- $y =~ /$x/i ? 1 : 0,
+ $y =~ /\Q$x/i ? 1 : 0,
"\n");
if ($x =~ $re || $y =~ $re) { # See above.
print "# Regex characters in '$x' or '$y', skipping test $locales_test_number for locale '$Locale'\n";
next;
}
- push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ push @f, $x unless $x =~ /\Q$y/i && $y =~ /\Q$x/i;
push @f, $x unless lc $x eq fc $x;
}
@@ -2164,12 +2164,12 @@ foreach my $Locale (@Locale) {
"; uc=", disp_chars(($y)), "; ",
"; fc=", disp_chars((fc $x)), "; ",
disp_chars(($x)), "=~/", disp_chars(($y)), "/i=",
- $x =~ /$y/i ? 1 : 0,
+ $x =~ /\Q$y/i ? 1 : 0,
"; ",
disp_chars(($y)), "=~/", disp_chars(($x)), "/i=",
- $y =~ /$x/i ? 1 : 0,
+ $y =~ /\Q$x/i ? 1 : 0,
"\n");
- push @f, $x unless $x =~ /$y/i && $y =~ /$x/i;
+ push @f, $x unless $x =~ /\Q$y/i && $y =~ /\Q$x/i;
push @f, $x unless lc $x eq fc $x;
}