diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-12-25 14:35:54 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-12-25 15:54:53 -0700 |
commit | 316393f0b9d30be1862abb6ee1eed22bbaa8b55b (patch) | |
tree | c433d770e1acd65b9d26dd3def123a9a2452809e | |
parent | 7b7ef1799255a4a4654ab0d681144b1ed9f2d3f6 (diff) | |
download | perl-316393f0b9d30be1862abb6ee1eed22bbaa8b55b.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.t | 3 |
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) { |