@@ -1076,7 +1076,22 @@ it("line: 207 - matches ^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$ against 'abcdefhi
10761076 expect ( match . matches [ 11 ] ) . toBe ( "abcdefhijklm" . substring ( 10 , 12 ) ) ;
10771077 expect ( match . matches [ 12 ] ) . toBe ( "abcdefhijklm" . substring ( 11 , 12 ) ) ;
10781078} ) ;
1079- xit ( "line: 208 - non capturing groups not supported" , ( ) => { } ) ;
1079+ it ( "line: 208 - matches ^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$ against 'abcdefhijklm'" , ( ) => {
1080+ const match = exec (
1081+ "^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$" ,
1082+ "abcdefhijklm" ,
1083+ "ms"
1084+ ) ;
1085+ expect ( match . matches [ 0 ] ) . toBe ( "abcdefhijklm" . substring ( 0 , 12 ) ) ;
1086+ expect ( match . matches [ 1 ] ) . toBe ( "abcdefhijklm" . substring ( 1 , 3 ) ) ;
1087+ expect ( match . matches [ 2 ] ) . toBe ( "abcdefhijklm" . substring ( 2 , 3 ) ) ;
1088+ expect ( match . matches [ 3 ] ) . toBe ( "abcdefhijklm" . substring ( 4 , 6 ) ) ;
1089+ expect ( match . matches [ 4 ] ) . toBe ( "abcdefhijklm" . substring ( 5 , 6 ) ) ;
1090+ expect ( match . matches [ 5 ] ) . toBe ( "abcdefhijklm" . substring ( 7 , 9 ) ) ;
1091+ expect ( match . matches [ 6 ] ) . toBe ( "abcdefhijklm" . substring ( 8 , 9 ) ) ;
1092+ expect ( match . matches [ 7 ] ) . toBe ( "abcdefhijklm" . substring ( 10 , 12 ) ) ;
1093+ expect ( match . matches [ 8 ] ) . toBe ( "abcdefhijklm" . substring ( 11 , 12 ) ) ;
1094+ } ) ;
10801095xit ( "line: 209 - back references are not supported" , ( ) => { } ) ;
10811096it ( "line: 210 - matches ^[.^$|()*+?{,}]+ against '.^$(*+)|{?,?}'" , ( ) => {
10821097 const match = exec ( "^[.^$|()*+?{,}]+" , ".^$(*+)|{?,?}" , "ms" ) ;
@@ -1305,10 +1320,10 @@ it("line: 266 - matches ^12.34 against '12\r34'", () => {
13051320} ) ;
13061321xit ( "line: 267 - lookaheads not supported" , ( ) => { } ) ;
13071322xit ( "line: 268 - lookaheads not supported" , ( ) => { } ) ;
1308- xit ( "line: 269 - non capturing groups not supported" , ( ) => { } ) ;
1309- xit ( "line: 270 - non capturing groups not supported" , ( ) => { } ) ;
1310- xit ( "line: 271 - non capturing groups not supported" , ( ) => { } ) ;
1311- xit ( "line: 272 - non capturing groups not supported" , ( ) => { } ) ;
1323+ xit ( "line: 269 - lookaheads not supported" , ( ) => { } ) ;
1324+ xit ( "line: 270 - lookaheads not supported" , ( ) => { } ) ;
1325+ xit ( "line: 271 - lookaheads not supported" , ( ) => { } ) ;
1326+ xit ( "line: 272 - lookaheads not supported" , ( ) => { } ) ;
13121327xit ( "line: 273 - lookaheads not supported" , ( ) => { } ) ;
13131328xit ( "line: 274 - lookaheads not supported" , ( ) => { } ) ;
13141329xit ( "line: 281 - test regex contains syntax not supported in JS" , ( ) => { } ) ;
@@ -1564,8 +1579,14 @@ it("line: 1162 - matches \\Aabc\\Z against 'qqq\nabc\nzzz'", () => {
15641579} ) ;
15651580xit ( "line: 1163 - JS does not support the A Z syntax for start and end of string" , ( ) => { } ) ;
15661581xit ( "line: 1164 - JS does not support the A Z syntax for start and end of string" , ( ) => { } ) ;
1567- xit ( "line: 1165 - non capturing groups not supported" , ( ) => { } ) ;
1568- xit ( "line: 1166 - non capturing groups not supported" , ( ) => { } ) ;
1582+ it ( "line: 1165 - matches (?:b)|(?::+) against 'b::c'" , ( ) => {
1583+ const match = exec ( "(?:b)|(?::+)" , "b::c" , "ms" ) ;
1584+ expect ( match . matches [ 0 ] ) . toBe ( "b::c" . substring ( 0 , 1 ) ) ;
1585+ } ) ;
1586+ it ( "line: 1166 - matches (?:b)|(?::+) against 'c::b'" , ( ) => {
1587+ const match = exec ( "(?:b)|(?::+)" , "c::b" , "ms" ) ;
1588+ expect ( match . matches [ 0 ] ) . toBe ( "c::b" . substring ( 1 , 3 ) ) ;
1589+ } ) ;
15691590it ( "line: 1167 - matches [-az]+ against 'az-'" , ( ) => {
15701591 const match = exec ( "[-az]+" , "az-" , "ms" ) ;
15711592 expect ( match . matches [ 0 ] ) . toBe ( "az-" . substring ( 0 , 3 ) ) ;
@@ -1954,9 +1975,21 @@ it("line: 1311 - matches \\d\\d\\/\\d\\d\\/\\d\\d\\d\\d against '01/01/2000'", (
19541975 const match = exec ( "\\d\\d\\/\\d\\d\\/\\d\\d\\d\\d" , "01/01/2000" , "ms" ) ;
19551976 expect ( match . matches [ 0 ] ) . toBe ( "01/01/2000" . substring ( 0 , 10 ) ) ;
19561977} ) ;
1957- xit ( "line: 1312 - non capturing groups not supported" , ( ) => { } ) ;
1958- xit ( "line: 1313 - non capturing groups not supported" , ( ) => { } ) ;
1959- xit ( "line: 1314 - non capturing groups not supported" , ( ) => { } ) ;
1978+ it ( "line: 1312 - matches word (?:[a-zA-Z0-9]+ ){0,10}otherword against 'word cat dog elephant mussel cow horse canary baboon snake shark otherword'" , ( ) => {
1979+ const match = exec (
1980+ "word (?:[a-zA-Z0-9]+ ){0,10}otherword" ,
1981+ "word cat dog elephant mussel cow horse canary baboon snake shark otherword" ,
1982+ "ms"
1983+ ) ;
1984+ expect ( match . matches [ 0 ] ) . toBe (
1985+ "word cat dog elephant mussel cow horse canary baboon snake shark otherword" . substring (
1986+ 0 ,
1987+ 74
1988+ )
1989+ ) ;
1990+ } ) ;
1991+ xit ( "line: 1313 - peformance issue" , ( ) => { } ) ;
1992+ xit ( "line: 1314 - peformance issue" , ( ) => { } ) ;
19601993it ( "line: 1315 - matches ^(a){0,0} against 'bcd'" , ( ) => {
19611994 const match = exec ( "^(a){0,0}" , "bcd" , "ms" ) ;
19621995 expect ( match . matches [ 0 ] ) . toBe ( "bcd" . substring ( 0 , 0 ) ) ;
0 commit comments