summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-12-08 15:39:24 -0700
committerKarl Williamson <khw@cpan.org>2018-12-26 12:50:38 -0700
commit6f0fba9bd70f6f3481c9d325e460600f33289639 (patch)
treebb2b9dbf6ab053616b2b8d9c099ccca3a30c8f80 /t
parentd11f185e6a90b33ef850c63d279285d422708be6 (diff)
downloadperl-6f0fba9bd70f6f3481c9d325e460600f33289639.tar.gz
Change length-1 ASCII fold pairs to ANYOFM regnodes
A node that matches only 'A' and 'a', for example, can be turned into an ANYOFM node, which is faster to execute. This is done after joining of adjacent EXACTFish nodes, as longer nodes are better than shorter ones, including because they lessen the number of bugs with multi-char folds not matching because of node boundaries. But if a length 1 node remains, ANYOFM is better.
Diffstat (limited to 't')
-rw-r--r--t/re/anyof.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/re/anyof.t b/t/re/anyof.t
index f08116b9be..ad0a2d9ada 100644
--- a/t/re/anyof.t
+++ b/t/re/anyof.t
@@ -141,13 +141,13 @@ my @tests = (
'(?il)[\x{212A}]' => 'ANYOFL{i}[{utf8 locale}Kk][212A]',
'(?il)(?[\x{212A}])' => 'ANYOFL{utf8-locale-reqd}[Kk][212A]',
- '(?i)b[s]\xe0' => 'EXACTFU <b>', # The s goes into a 2nd node
+ '(?i)b[s]\xe0' => 'ANYOFM[Bb]', # The s goes into a 2nd node
- 'ebcdic_ok_below_this_marker',
+ '[aA]' => 'ANYOFM[Aa]',
+ '[bB]' => 'ANYOFM[Bb]',
+ '[kK]' => 'ANYOFM[Kk]',
- '[aA]' => 'EXACTFAA <a>',
- '[bB]' => 'EXACTFU <b>',
- '[kK]' => 'EXACTFAA <k>',
+ 'ebcdic_ok_below_this_marker',
'(?i:[^:])' => 'NANYOFM[:]',