File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -147,16 +147,16 @@ describe('recursion', () => {
147147 expect ( regex ( { plugins : [ recursion ] , subclass : true } ) `(?<d>a)(?R=2)?` . exec ( 'aa' ) ) . toHaveSize ( 2 ) ;
148148 } ) ;
149149
150- it ( 'should handle recursion that contains emulation groups ' , ( ) => {
150+ it ( 'should handle recursion that contains hidden captures ' , ( ) => {
151151 expect ( recursion ( r `^((a)\g<1&R=2>?b)$` , {
152152 hiddenCaptures : [ 2 ] ,
153153 } ) ) . toEqual ( {
154154 pattern : '^((a)(?:(a)(?:)?b)?b)$' ,
155155 captureTransfers : new Map ( ) ,
156156 hiddenCaptures : [ 2 , 3 ] ,
157157 } ) ;
158- // Atomic groups are handled by Regex+ after external plugins like recursion, so this is
159- // actually testing Regex+'s ability to preserve and add to emulation groups between plugins
158+ // Atomic groups are handled by Regex+ * after* external plugins like recursion, so this is
159+ // actually testing Regex+'s ability to preserve and add to hidden captures across plugins
160160 expect ( regex ( { plugins : [ recursion ] , subclass : true , disable : { n : true } } ) `^(((?>a))\g<1&R=2>?b)$` . exec ( 'aabb' ) ) . toHaveSize ( 3 ) ;
161161 expect ( regex ( { plugins : [ recursion ] , subclass : true , disable : { n : true } } ) `^(((?>a)(?>x))\g<1&R=2>?b)$` . exec ( 'axaxbb' ) ) . toHaveSize ( 3 ) ;
162162 } ) ;
You can’t perform that action at this time.
0 commit comments