summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-12-25 14:35:54 -0700
committerKarl Williamson <public@khwilliamson.com>2012-01-19 11:58:20 -0700
commit8edd0c7f1de2cb79064568cc8a4d7a17ffd1a732 (patch)
treeff1a89e611ae6e493e32ccd3d5406ed04701d909
parent3c3418fb500d59ad404a81b943408ce8254f50ae (diff)
downloadperl-8edd0c7f1de2cb79064568cc8a4d7a17ffd1a732.tar.gz
reg_fold.t: Test bracketed character classes
These were removed when things were very broken, but now they work, except for things like "\N{LATIN SMALL LIGATURE FFI}" =~ /[a-z]{3}/i where the multi-char fold crosses single bracketed character class boundaries. These will probably never be fixed in Perl in the general case (using \F and fc() instead), but I expect that "\N{LATIN SMALL LIGATURE FFI}" =~ /[f][f][i]/i will eventually be changed so the brackets are optimized away, and will work. Then these TODOs will start passing.
-rw-r--r--t/re/reg_fold.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/re/reg_fold.t b/t/re/reg_fold.t
index e8c6262a35..264b2fda4b 100644
--- a/t/re/reg_fold.t
+++ b/t/re/reg_fold.t
@@ -24,7 +24,7 @@ while (<$fh>) {
my $chr="\\x{$cp}";
my @str;
foreach my $swap (0, 1) { # swap lhs and rhs, or not.
- foreach my $charclass (0) { # Put rhs in [...], or not
+ foreach my $charclass (0, 1) { # Put rhs in [...], or not
my $lhs;
my $rhs;
if ($swap) {
@@ -32,6 +32,7 @@ while (<$fh>) {
$rhs = $chr;
$rhs = "[$rhs]" if $charclass;
} else {
+ #next if $charclass && @folded > 1;
$lhs = $chr;
$rhs = "";
foreach my $rhs_char (@folded) {