@@ -716,11 +716,6 @@ describe('expand', () => {
716716 expect ( iterator2 . next ( ) . value ) . toBe ( 'z z' ) ;
717717 } ) ;
718718
719- it ( 'expands backreferences with numeric names' , ( ) => {
720- const result = expandAll ( '(?<20>a) \\k<20> (?<50>z) \\k<50>' ) ;
721- expect ( result ) . toEqual ( [ 'a a z z' ] ) ;
722- } ) ;
723-
724719 it ( 'is performant' , ( ) => {
725720 const trial = ( ) => expand ( / ( [ a b ] | ( c | [ d - e ] ) { 2 , 3 } ) ( \w ? ) \1/ ) ;
726721 const averageTime = measureAverageTime ( trial , 5 ) ;
@@ -900,6 +895,7 @@ describe('expand', () => {
900895 [ 'capture group' , "(?'x'abc)" ] ,
901896 [ 'capture group' , '(?P<x>abc)' ] ,
902897 [ 'capture group with duplicate names' , '(?<x>a)|(?<x>b)' ] ,
898+ [ 'capture group with numeric name' , '(?<20>a)' ] ,
903899 [ 'capture group with negative number name' , '(?<-17>abc)' ] ,
904900 [ 'backreference' , '(?<x>a) (?P=x)' ] ,
905901 [ 'backreference nested with group' , '(?<x>a\\k<x>?)' ] ,
@@ -1472,7 +1468,6 @@ describe('expand', () => {
14721468 [ 'backreference' , "(?<x>ab) \\k'x'" ] ,
14731469 [ 'backreference' , '(?<x>ab) \\k{x}' ] ,
14741470 [ 'backreference' , '(?<x>ab) \\g{x}' ] ,
1475- [ 'capture groups override numbered index' , '(?<17>ab) \\17' ] ,
14761471 [ 'failed backreference' , '(?<x>ab)? \\k<x>' ] ,
14771472 ] ) (
14781473 'does not recognize RegEx syntax: %s /%s/' ,
0 commit comments