@@ -442,7 +442,7 @@ it("line: 89 - matches ^[ab\\]cde] against 'fthing'", () => {
442
442
it ( "line: 90 - matches ^[ab\\]cde] against '[thing'" , ( ) => {
443
443
expectNotMatch ( "^[ab\\]cde]" , [ "[thing" ] ) ;
444
444
} ) ;
445
- it ( "line: 91 - matches ^[ab\\]cde] against '\\\ thing'" , ( ) => {
445
+ it ( "line: 91 - matches ^[ab\\]cde] against '\\thing'" , ( ) => {
446
446
expectNotMatch ( "^[ab\\]cde]" , [ "\\thing" ] ) ;
447
447
} ) ;
448
448
it ( "line: 92 - matches ^[]cde] against ']thing'" , ( ) => {
@@ -475,7 +475,7 @@ it("line: 99 - matches ^[^ab\\]cde] against '[thing'", () => {
475
475
const match = exec ( "^[^ab\\]cde]" , "[thing" , "s" ) ;
476
476
expect ( match . matches [ 0 ] ) . toBe ( "[thing" . substring ( 0 , 1 ) ) ;
477
477
} ) ;
478
- it ( "line: 100 - matches ^[^ab\\]cde] against '\\\ thing'" , ( ) => {
478
+ it ( "line: 100 - matches ^[^ab\\]cde] against '\\thing'" , ( ) => {
479
479
const match = exec ( "^[^ab\\]cde]" , "\\thing" , "s" ) ;
480
480
expect ( match . matches [ 0 ] ) . toBe ( "\\thing" . substring ( 0 , 1 ) ) ;
481
481
} ) ;
@@ -706,7 +706,7 @@ it("line: 159 - matches ([\\da-f:]+)$ against '0zzz'", () => {
706
706
it ( "line: 160 - matches ([\\da-f:]+)$ against 'gzzz'" , ( ) => {
707
707
expectNotMatch ( "([\\da-f:]+)$" , [ "gzzz" ] ) ;
708
708
} ) ;
709
- it ( "line: 161 - matches ([\\da-f:]+)$ against 'fed\\ x20'" , ( ) => {
709
+ it ( "line: 161 - matches ([\\da-f:]+)$ against 'fed\x20'" , ( ) => {
710
710
expectNotMatch ( "([\\da-f:]+)$" , [ "fed\x20" ] ) ;
711
711
} ) ;
712
712
it ( "line: 162 - matches ([\\da-f:]+)$ against 'Any old rubbish'" , ( ) => {
@@ -915,10 +915,23 @@ it("line: 191 - matches ^[\\da-f](\\.[\\da-f])*$ against 'a.b.c.1.2.3.C'", () =>
915
915
expect ( match . matches [ 0 ] ) . toBe ( "a.b.c.1.2.3.C" . substring ( 0 , 13 ) ) ;
916
916
expect ( match . matches [ 1 ] ) . toBe ( "a.b.c.1.2.3.C" . substring ( 11 , 13 ) ) ;
917
917
} ) ;
918
- xit ( "line: 192 - test cases with quotes are not supported yet!" , ( ) => { } ) ;
919
- xit ( "line: 193 - test cases with quotes are not supported yet!" , ( ) => { } ) ;
920
- xit ( "line: 194 - test cases with quotes are not supported yet!" , ( ) => { } ) ;
921
- xit ( "line: 195 - test cases with quotes are not supported yet!" , ( ) => { } ) ;
918
+ it ( 'line: 192 - matches ^".*"\\s*(;.*)?$ against \'"1234"\'' , ( ) => {
919
+ const match = exec ( '^".*"\\s*(;.*)?$' , '"1234"' , "s" ) ;
920
+ expect ( match . matches [ 0 ] ) . toBe ( '"1234"' . substring ( 0 , 6 ) ) ;
921
+ } ) ;
922
+ it ( 'line: 193 - matches ^".*"\\s*(;.*)?$ against \'"abcd" ;\'' , ( ) => {
923
+ const match = exec ( '^".*"\\s*(;.*)?$' , '"abcd" ;' , "s" ) ;
924
+ expect ( match . matches [ 0 ] ) . toBe ( '"abcd" ;' . substring ( 0 , 8 ) ) ;
925
+ expect ( match . matches [ 1 ] ) . toBe ( '"abcd" ;' . substring ( 7 , 8 ) ) ;
926
+ } ) ;
927
+ it ( 'line: 194 - matches ^".*"\\s*(;.*)?$ against \'"" ; rhubarb\'' , ( ) => {
928
+ const match = exec ( '^".*"\\s*(;.*)?$' , '"" ; rhubarb' , "s" ) ;
929
+ expect ( match . matches [ 0 ] ) . toBe ( '"" ; rhubarb' . substring ( 0 , 12 ) ) ;
930
+ expect ( match . matches [ 1 ] ) . toBe ( '"" ; rhubarb' . substring ( 3 , 12 ) ) ;
931
+ } ) ;
932
+ it ( 'line: 195 - matches ^".*"\\s*(;.*)?$ against \'"1234" : things\'' , ( ) => {
933
+ expectNotMatch ( '^".*"\\s*(;.*)?$' , [ '"1234" : things' ] ) ;
934
+ } ) ;
922
935
it ( "line: 196 - matches ^$ against ''" , ( ) => {
923
936
const match = exec ( "^$" , "" , "s" ) ;
924
937
expect ( match . matches [ 0 ] ) . toBe ( "" . substring ( 0 , 0 ) ) ;
@@ -1095,11 +1108,11 @@ it("line: 264 - matches ^From\\s+\\S+\\s+([a-zA-Z]{3}\\s+){2}\\d{1,2}\\s+\\d\\d:
1095
1108
[ "From abcd Sep 01 12:33:02 1997" ]
1096
1109
) ;
1097
1110
} ) ;
1098
- it ( "line: 265 - matches ^12.34 against '12\\ n34'" , ( ) => {
1111
+ it ( "line: 265 - matches ^12.34 against '12\n34'" , ( ) => {
1099
1112
const match = exec ( "^12.34" , "12\n34" , "s" ) ;
1100
1113
expect ( match . matches [ 0 ] ) . toBe ( "12\n34" . substring ( 0 , 5 ) ) ;
1101
1114
} ) ;
1102
- it ( "line: 266 - matches ^12.34 against '12\\ r34'" , ( ) => {
1115
+ it ( "line: 266 - matches ^12.34 against '12\r34'" , ( ) => {
1103
1116
const match = exec ( "^12.34" , "12\r34" , "s" ) ;
1104
1117
expect ( match . matches [ 0 ] ) . toBe ( "12\r34" . substring ( 0 , 5 ) ) ;
1105
1118
} ) ;
@@ -1126,36 +1139,36 @@ xit("line: 292 - lazy quantifiers are not supported", () => {});
1126
1139
xit ( "line: 293 - lazy quantifiers are not supported" , ( ) => { } ) ;
1127
1140
xit ( "line: 488 - lazy quantifiers are not supported" , ( ) => { } ) ;
1128
1141
xit ( "line: 489 - lazy quantifiers are not supported" , ( ) => { } ) ;
1129
- xit ( "line: 490 - test cases with quotes are not supported yet! " , ( ) => { } ) ;
1142
+ xit ( "line: 490 - lazy quantifiers are not supported" , ( ) => { } ) ;
1130
1143
xit ( "line: 491 - lazy quantifiers are not supported" , ( ) => { } ) ;
1131
- xit ( "line: 492 - test cases with quotes are not supported yet! " , ( ) => { } ) ;
1144
+ xit ( "line: 492 - lazy quantifiers are not supported" , ( ) => { } ) ;
1132
1145
xit ( "line: 493 - lazy quantifiers are not supported" , ( ) => { } ) ;
1133
1146
xit ( "line: 494 - lazy quantifiers are not supported" , ( ) => { } ) ;
1134
1147
xit ( "line: 1077 - lazy quantifiers are not supported" , ( ) => { } ) ;
1135
1148
xit ( "line: 1078 - lazy quantifiers are not supported" , ( ) => { } ) ;
1136
- xit ( "line: 1079 - test cases with quotes are not supported yet! " , ( ) => { } ) ;
1149
+ xit ( "line: 1079 - lazy quantifiers are not supported" , ( ) => { } ) ;
1137
1150
xit ( "line: 1080 - lazy quantifiers are not supported" , ( ) => { } ) ;
1138
- xit ( "line: 1081 - test cases with quotes are not supported yet! " , ( ) => { } ) ;
1151
+ xit ( "line: 1081 - lazy quantifiers are not supported" , ( ) => { } ) ;
1139
1152
xit ( "line: 1082 - lazy quantifiers are not supported" , ( ) => { } ) ;
1140
1153
xit ( "line: 1083 - lazy quantifiers are not supported" , ( ) => { } ) ;
1141
1154
xit ( "line: 1084 - back references are not supported" , ( ) => { } ) ;
1142
1155
xit ( "line: 1085 - back references are not supported" , ( ) => { } ) ;
1143
1156
xit ( "line: 1086 - test encoding issue" , ( ) => { } ) ;
1144
1157
xit ( "line: 1087 - requires triage" , ( ) => { } ) ;
1145
1158
xit ( "line: 1088 - requires triage" , ( ) => { } ) ;
1146
- it ( "line: 1089 - matches abc\\\ x0def\\x00pqr\\x000xyz\\x0000AB against 'abc456 abc\ \x0def\x00pqr\x000xyz\x0000ABCDE'" , ( ) => {
1159
+ it ( "line: 1089 - matches abc\\x0def\\x00pqr\\x000xyz\\x0000AB against 'abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE'" , ( ) => {
1147
1160
const match = exec (
1148
- "abc\\\ x0def\\x00pqr\\x000xyz\\x0000AB" ,
1161
+ "abc\\x0def\\x00pqr\\x000xyz\\x0000AB" ,
1149
1162
"abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE" ,
1150
1163
"s"
1151
1164
) ;
1152
1165
expect ( match . matches [ 0 ] ) . toBe (
1153
1166
"abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE" . substring ( 7 , 27 )
1154
1167
) ;
1155
1168
} ) ;
1156
- it ( "line: 1090 - matches abc\\\ x0def\\x00pqr\\x000xyz\\x0000AB against 'abc456 abc\ \x0def\x00pqr\x000xyz\x0000ABCDE'" , ( ) => {
1169
+ it ( "line: 1090 - matches abc\\x0def\\x00pqr\\x000xyz\\x0000AB against 'abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE'" , ( ) => {
1157
1170
const match = exec (
1158
- "abc\\\ x0def\\x00pqr\\x000xyz\\x0000AB" ,
1171
+ "abc\\x0def\\x00pqr\\x000xyz\\x0000AB" ,
1159
1172
"abc456 abc\x0def\x00pqr\x000xyz\x0000ABCDE" ,
1160
1173
"s"
1161
1174
) ;
@@ -1176,23 +1189,23 @@ xit("line: 1100 - back references are not supported", () => {});
1176
1189
xit ( "line: 1101 - back references are not supported" , ( ) => { } ) ;
1177
1190
xit ( "line: 1102 - test contains an octal escape sequence" , ( ) => { } ) ;
1178
1191
xit ( "line 1103 - issue with parsing the test itself" , ( ) => { } ) ;
1179
- it ( "line: 1104 - matches ^\\s against '\\ x0cxyz'" , ( ) => {
1192
+ it ( "line: 1104 - matches ^\\s against '\x0cxyz'" , ( ) => {
1180
1193
const match = exec ( "^\\s" , "\x0cxyz" , "s" ) ;
1181
1194
expect ( match . matches [ 0 ] ) . toBe ( "\x0cxyz" . substring ( 0 , 1 ) ) ;
1182
1195
} ) ;
1183
- it ( "line: 1105 - matches ^\\s against '\\ fabc'" , ( ) => {
1196
+ it ( "line: 1105 - matches ^\\s against '\fabc'" , ( ) => {
1184
1197
const match = exec ( "^\\s" , "\fabc" , "s" ) ;
1185
1198
expect ( match . matches [ 0 ] ) . toBe ( "\fabc" . substring ( 0 , 1 ) ) ;
1186
1199
} ) ;
1187
- it ( "line: 1106 - matches ^\\s against '\\ nabc'" , ( ) => {
1200
+ it ( "line: 1106 - matches ^\\s against '\nabc'" , ( ) => {
1188
1201
const match = exec ( "^\\s" , "\nabc" , "s" ) ;
1189
1202
expect ( match . matches [ 0 ] ) . toBe ( "\nabc" . substring ( 0 , 1 ) ) ;
1190
1203
} ) ;
1191
- it ( "line: 1107 - matches ^\\s against '\\ rabc'" , ( ) => {
1204
+ it ( "line: 1107 - matches ^\\s against '\rabc'" , ( ) => {
1192
1205
const match = exec ( "^\\s" , "\rabc" , "s" ) ;
1193
1206
expect ( match . matches [ 0 ] ) . toBe ( "\rabc" . substring ( 0 , 1 ) ) ;
1194
1207
} ) ;
1195
- it ( "line: 1108 - matches ^\\s against '\\ tabc'" , ( ) => {
1208
+ it ( "line: 1108 - matches ^\\s against '\tabc'" , ( ) => {
1196
1209
const match = exec ( "^\\s" , "\tabc" , "s" ) ;
1197
1210
expect ( match . matches [ 0 ] ) . toBe ( "\tabc" . substring ( 0 , 1 ) ) ;
1198
1211
} ) ;
@@ -1308,13 +1321,13 @@ it("line: 1154 - matches ^abc$ against 'abc'", () => {
1308
1321
const match = exec ( "^abc$" , "abc" , "s" ) ;
1309
1322
expect ( match . matches [ 0 ] ) . toBe ( "abc" . substring ( 0 , 3 ) ) ;
1310
1323
} ) ;
1311
- it ( "line: 1155 - matches ^abc$ against 'qqq\\ nabc'" , ( ) => {
1324
+ it ( "line: 1155 - matches ^abc$ against 'qqq\nabc'" , ( ) => {
1312
1325
expectNotMatch ( "^abc$" , [ "qqq\nabc" ] ) ;
1313
1326
} ) ;
1314
- it ( "line: 1156 - matches ^abc$ against 'abc\\ nzzz'" , ( ) => {
1327
+ it ( "line: 1156 - matches ^abc$ against 'abc\nzzz'" , ( ) => {
1315
1328
expectNotMatch ( "^abc$" , [ "abc\nzzz" ] ) ;
1316
1329
} ) ;
1317
- it ( "line: 1157 - matches ^abc$ against 'qqq\\ nabc\nzzz'" , ( ) => {
1330
+ it ( "line: 1157 - matches ^abc$ against 'qqq\nabc\nzzz'" , ( ) => {
1318
1331
expectNotMatch ( "^abc$" , [ "qqq\nabc\nzzz" ] ) ;
1319
1332
} ) ;
1320
1333
xit ( "line: 1158 - multi line regex not supported yet!" , ( ) => { } ) ;
@@ -1358,16 +1371,16 @@ it("line: 1174 - matches [\\d-]+ against '12-34'", () => {
1358
1371
it ( "line: 1175 - matches [\\d-]+ against 'aaa'" , ( ) => {
1359
1372
expectNotMatch ( "[\\d-]+" , [ "aaa" ] ) ;
1360
1373
} ) ;
1361
- it ( "line: 1178 - matches \\\ x5c against '\\'" , ( ) => {
1362
- const match = exec ( "\\\ x5c" , "\\" , "s" ) ;
1374
+ it ( "line: 1178 - matches \\x5c against '\\'" , ( ) => {
1375
+ const match = exec ( "\\x5c" , "\\" , "s" ) ;
1363
1376
expect ( match . matches [ 0 ] ) . toBe ( "\\" . substring ( 0 , 1 ) ) ;
1364
1377
} ) ;
1365
- it ( "line: 1179 - matches \\\ x20Z against 'the Zoo'" , ( ) => {
1366
- const match = exec ( "\\\ x20Z" , "the Zoo" , "s" ) ;
1378
+ it ( "line: 1179 - matches \\x20Z against 'the Zoo'" , ( ) => {
1379
+ const match = exec ( "\\x20Z" , "the Zoo" , "s" ) ;
1367
1380
expect ( match . matches [ 0 ] ) . toBe ( "the Zoo" . substring ( 3 , 5 ) ) ;
1368
1381
} ) ;
1369
- it ( "line: 1180 - matches \\\ x20Z against 'Zulu'" , ( ) => {
1370
- expectNotMatch ( "\\\ x20Z" , [ "Zulu" ] ) ;
1382
+ it ( "line: 1180 - matches \\x20Z against 'Zulu'" , ( ) => {
1383
+ expectNotMatch ( "\\x20Z" , [ "Zulu" ] ) ;
1371
1384
} ) ;
1372
1385
xit ( "line: 1181 - back references are not supported" , ( ) => { } ) ;
1373
1386
xit ( "line: 1182 - back references are not supported" , ( ) => { } ) ;
@@ -1382,23 +1395,23 @@ xit("line 1186 - issue with parsing the test itself", () => {});
1382
1395
xit ( "line 1187 - issue with parsing the test itself" , ( ) => { } ) ;
1383
1396
xit ( "line 1188 - issue with parsing the test itself" , ( ) => { } ) ;
1384
1397
xit ( "line: 1189 - test indicates a malformed regex, whereas it appears OK in JS" , ( ) => { } ) ;
1385
- it ( "line: 1190 - matches ^a.b against 'a\\ rb'" , ( ) => {
1398
+ it ( "line: 1190 - matches ^a.b against 'a\rb'" , ( ) => {
1386
1399
const match = exec ( "^a.b" , "a\rb" , "s" ) ;
1387
1400
expect ( match . matches [ 0 ] ) . toBe ( "a\rb" . substring ( 0 , 3 ) ) ;
1388
1401
} ) ;
1389
- it ( "line: 1191 - matches ^a.b against 'a\\ nb'" , ( ) => {
1402
+ it ( "line: 1191 - matches ^a.b against 'a\nb'" , ( ) => {
1390
1403
const match = exec ( "^a.b" , "a\nb" , "s" ) ;
1391
1404
expect ( match . matches [ 0 ] ) . toBe ( "a\nb" . substring ( 0 , 3 ) ) ;
1392
1405
} ) ;
1393
1406
it ( "line: 1192 - matches abc$ against 'abc'" , ( ) => {
1394
1407
const match = exec ( "abc$" , "abc" , "s" ) ;
1395
1408
expect ( match . matches [ 0 ] ) . toBe ( "abc" . substring ( 0 , 3 ) ) ;
1396
1409
} ) ;
1397
- it ( "line: 1193 - matches abc$ against 'abc\\ n'" , ( ) => {
1410
+ it ( "line: 1193 - matches abc$ against 'abc\n'" , ( ) => {
1398
1411
expectNotMatch ( "abc$" , [ "abc\n" ] ) ;
1399
1412
} ) ;
1400
1413
xit ( "line: 1194 - multi line regex not supported yet!" , ( ) => { } ) ;
1401
- it ( "line: 1195 - matches abc$ against 'abc\\ ndef'" , ( ) => {
1414
+ it ( "line: 1195 - matches abc$ against 'abc\ndef'" , ( ) => {
1402
1415
expectNotMatch ( "abc$" , [ "abc\ndef" ] ) ;
1403
1416
} ) ;
1404
1417
xit ( "line: 1196 - multi line regex not supported yet!" , ( ) => { } ) ;
@@ -1466,7 +1479,7 @@ it("line: 1243 - matches [^a]+ against 'AAAaAbc '", () => {
1466
1479
const match = exec ( "[^a]+" , "AAAaAbc " , "is" ) ;
1467
1480
expect ( match . matches [ 0 ] ) . toBe ( "AAAaAbc " . substring ( 5 , 8 ) ) ;
1468
1481
} ) ;
1469
- it ( "line: 1244 - matches [^a]+ against 'bbb\\ nccc'" , ( ) => {
1482
+ it ( "line: 1244 - matches [^a]+ against 'bbb\nccc'" , ( ) => {
1470
1483
const match = exec ( "[^a]+" , "bbb\nccc" , "s" ) ;
1471
1484
expect ( match . matches [ 0 ] ) . toBe ( "bbb\nccc" . substring ( 0 , 7 ) ) ;
1472
1485
} ) ;
@@ -1812,41 +1825,41 @@ it("line: 1347 - matches ^(a){1,} against 'aaaaaaaa '", () => {
1812
1825
expect ( match . matches [ 0 ] ) . toBe ( "aaaaaaaa " . substring ( 0 , 8 ) ) ;
1813
1826
expect ( match . matches [ 1 ] ) . toBe ( "aaaaaaaa " . substring ( 7 , 8 ) ) ;
1814
1827
} ) ;
1815
- it ( "line: 1348 - matches .{0,}\\.gif against 'borfle\\ nbib.gif\nno'" , ( ) => {
1828
+ it ( "line: 1348 - matches .{0,}\\.gif against 'borfle\nbib.gif\nno'" , ( ) => {
1816
1829
const match = exec ( ".{0,}\\.gif" , "borfle\nbib.gif\nno" , "s" ) ;
1817
1830
expect ( match . matches [ 0 ] ) . toBe ( "borfle\nbib.gif\nno" . substring ( 0 , 14 ) ) ;
1818
1831
} ) ;
1819
- it ( "line: 1349 - matches .*\\.gif against 'borfle\\ nbib.gif\nno'" , ( ) => {
1832
+ it ( "line: 1349 - matches .*\\.gif against 'borfle\nbib.gif\nno'" , ( ) => {
1820
1833
const match = exec ( ".*\\.gif" , "borfle\nbib.gif\nno" , "s" ) ;
1821
1834
expect ( match . matches [ 0 ] ) . toBe ( "borfle\nbib.gif\nno" . substring ( 0 , 14 ) ) ;
1822
1835
} ) ;
1823
1836
xit ( "line: 1350 - multi line regex not supported yet!" , ( ) => { } ) ;
1824
- it ( "line: 1351 - matches .*\\.gif against 'borfle\\ nbib.gif\nno'" , ( ) => {
1837
+ it ( "line: 1351 - matches .*\\.gif against 'borfle\nbib.gif\nno'" , ( ) => {
1825
1838
const match = exec ( ".*\\.gif" , "borfle\nbib.gif\nno" , "s" ) ;
1826
1839
expect ( match . matches [ 0 ] ) . toBe ( "borfle\nbib.gif\nno" . substring ( 0 , 14 ) ) ;
1827
1840
} ) ;
1828
1841
xit ( "line: 1352 - multi line regex not supported yet!" , ( ) => { } ) ;
1829
- it ( "line: 1353 - matches .*$ against 'borfle\\ nbib.gif\nno'" , ( ) => {
1842
+ it ( "line: 1353 - matches .*$ against 'borfle\nbib.gif\nno'" , ( ) => {
1830
1843
const match = exec ( ".*$" , "borfle\nbib.gif\nno" , "s" ) ;
1831
1844
expect ( match . matches [ 0 ] ) . toBe ( "borfle\nbib.gif\nno" . substring ( 0 , 17 ) ) ;
1832
1845
} ) ;
1833
1846
xit ( "line: 1354 - multi line regex not supported yet!" , ( ) => { } ) ;
1834
- it ( "line: 1355 - matches .*$ against 'borfle\\ nbib.gif\nno'" , ( ) => {
1847
+ it ( "line: 1355 - matches .*$ against 'borfle\nbib.gif\nno'" , ( ) => {
1835
1848
const match = exec ( ".*$" , "borfle\nbib.gif\nno" , "s" ) ;
1836
1849
expect ( match . matches [ 0 ] ) . toBe ( "borfle\nbib.gif\nno" . substring ( 0 , 17 ) ) ;
1837
1850
} ) ;
1838
1851
xit ( "line: 1356 - multi line regex not supported yet!" , ( ) => { } ) ;
1839
- it ( "line: 1357 - matches .*$ against 'borfle\\ nbib.gif\nno\n'" , ( ) => {
1852
+ it ( "line: 1357 - matches .*$ against 'borfle\nbib.gif\nno\n'" , ( ) => {
1840
1853
const match = exec ( ".*$" , "borfle\nbib.gif\nno\n" , "s" ) ;
1841
1854
expect ( match . matches [ 0 ] ) . toBe ( "borfle\nbib.gif\nno\n" . substring ( 0 , 18 ) ) ;
1842
1855
} ) ;
1843
1856
xit ( "line: 1358 - multi line regex not supported yet!" , ( ) => { } ) ;
1844
- it ( "line: 1359 - matches .*$ against 'borfle\\ nbib.gif\nno\n'" , ( ) => {
1857
+ it ( "line: 1359 - matches .*$ against 'borfle\nbib.gif\nno\n'" , ( ) => {
1845
1858
const match = exec ( ".*$" , "borfle\nbib.gif\nno\n" , "s" ) ;
1846
1859
expect ( match . matches [ 0 ] ) . toBe ( "borfle\nbib.gif\nno\n" . substring ( 0 , 18 ) ) ;
1847
1860
} ) ;
1848
1861
xit ( "line: 1360 - multi line regex not supported yet!" , ( ) => { } ) ;
1849
- it ( "line: 1361 - matches (.*X|^B) against 'abcde\\ n1234Xyz'" , ( ) => {
1862
+ it ( "line: 1361 - matches (.*X|^B) against 'abcde\n1234Xyz'" , ( ) => {
1850
1863
const match = exec ( "(.*X|^B)" , "abcde\n1234Xyz" , "s" ) ;
1851
1864
expect ( match . matches [ 0 ] ) . toBe ( "abcde\n1234Xyz" . substring ( 0 , 11 ) ) ;
1852
1865
expect ( match . matches [ 1 ] ) . toBe ( "abcde\n1234Xyz" . substring ( 0 , 11 ) ) ;
@@ -1860,7 +1873,7 @@ xit("line: 1363 - requires triage", () => {});
1860
1873
xit ( "line: 1364 - multi line regex not supported yet!" , ( ) => { } ) ;
1861
1874
xit ( "line: 1365 - multi line regex not supported yet!" , ( ) => { } ) ;
1862
1875
xit ( "line: 1366 - multi line regex not supported yet!" , ( ) => { } ) ;
1863
- it ( "line: 1367 - matches (.*X|^B) against 'abcde\\ n1234Xyz'" , ( ) => {
1876
+ it ( "line: 1367 - matches (.*X|^B) against 'abcde\n1234Xyz'" , ( ) => {
1864
1877
const match = exec ( "(.*X|^B)" , "abcde\n1234Xyz" , "s" ) ;
1865
1878
expect ( match . matches [ 0 ] ) . toBe ( "abcde\n1234Xyz" . substring ( 0 , 11 ) ) ;
1866
1879
expect ( match . matches [ 1 ] ) . toBe ( "abcde\n1234Xyz" . substring ( 0 , 11 ) ) ;
@@ -1880,7 +1893,7 @@ xit("line: 1375 - non capturing groups not supported", () => {});
1880
1893
xit ( "line: 1376 - non capturing groups not supported" , ( ) => { } ) ;
1881
1894
xit ( "line: 1377 - non capturing groups not supported" , ( ) => { } ) ;
1882
1895
xit ( "line: 1378 - non capturing groups not supported" , ( ) => { } ) ;
1883
- it ( "line: 1379 - matches ^.*B against 'abc\\ nB'" , ( ) => {
1896
+ it ( "line: 1379 - matches ^.*B against 'abc\nB'" , ( ) => {
1884
1897
const match = exec ( "^.*B" , "abc\nB" , "s" ) ;
1885
1898
expect ( match . matches [ 0 ] ) . toBe ( "abc\nB" . substring ( 0 , 5 ) ) ;
1886
1899
} ) ;
@@ -1974,8 +1987,24 @@ it("line: 1405 - matches ab\\d{0}e against 'abe'", () => {
1974
1987
it ( "line: 1406 - matches ab\\d{0}e against 'ab1e '" , ( ) => {
1975
1988
expectNotMatch ( "ab\\d{0}e" , [ "ab1e " ] ) ;
1976
1989
} ) ;
1977
- xit ( "line: 1407 - test cases with quotes are not supported yet!" , ( ) => { } ) ;
1978
- xit ( "line: 1408 - test cases with quotes are not supported yet!" , ( ) => { } ) ;
1990
+ it ( 'line: 1407 - matches "([^\\\\"]+|\\\\.)*" against \'the "quick" brown fox\'' , ( ) => {
1991
+ const match = exec ( '"([^\\\\"]+|\\\\.)*"' , 'the "quick" brown fox' , "s" ) ;
1992
+ expect ( match . matches [ 0 ] ) . toBe ( 'the "quick" brown fox' . substring ( 4 , 11 ) ) ;
1993
+ expect ( match . matches [ 1 ] ) . toBe ( 'the "quick" brown fox' . substring ( 5 , 10 ) ) ;
1994
+ } ) ;
1995
+ it ( 'line: 1408 - matches "([^\\\\"]+|\\\\.)*" against \'"the \\"quick\\" brown fox" \'' , ( ) => {
1996
+ const match = exec (
1997
+ '"([^\\\\"]+|\\\\.)*"' ,
1998
+ '"the \\"quick\\" brown fox" ' ,
1999
+ "s"
2000
+ ) ;
2001
+ expect ( match . matches [ 0 ] ) . toBe (
2002
+ '"the \\"quick\\" brown fox" ' . substring ( 0 , 25 )
2003
+ ) ;
2004
+ expect ( match . matches [ 1 ] ) . toBe (
2005
+ '"the \\"quick\\" brown fox" ' . substring ( 14 , 24 )
2006
+ ) ;
2007
+ } ) ;
1979
2008
xit ( "line: 1409 - lazy quantifiers are not supported" , ( ) => { } ) ;
1980
2009
xit ( "line: 1410 - word boundary class not supported yet!" , ( ) => { } ) ;
1981
2010
xit ( "line: 1411 - word boundary class not supported yet!" , ( ) => { } ) ;
@@ -1985,31 +2014,31 @@ it("line: 1414 - matches a[^a]b against 'acb'", () => {
1985
2014
const match = exec ( "a[^a]b" , "acb" , "s" ) ;
1986
2015
expect ( match . matches [ 0 ] ) . toBe ( "acb" . substring ( 0 , 3 ) ) ;
1987
2016
} ) ;
1988
- it ( "line: 1415 - matches a[^a]b against 'a\\ nb'" , ( ) => {
2017
+ it ( "line: 1415 - matches a[^a]b against 'a\nb'" , ( ) => {
1989
2018
const match = exec ( "a[^a]b" , "a\nb" , "s" ) ;
1990
2019
expect ( match . matches [ 0 ] ) . toBe ( "a\nb" . substring ( 0 , 3 ) ) ;
1991
2020
} ) ;
1992
2021
it ( "line: 1416 - matches a.b against 'acb'" , ( ) => {
1993
2022
const match = exec ( "a.b" , "acb" , "s" ) ;
1994
2023
expect ( match . matches [ 0 ] ) . toBe ( "acb" . substring ( 0 , 3 ) ) ;
1995
2024
} ) ;
1996
- it ( "line: 1417 - matches a.b against 'a\\ nb '" , ( ) => {
2025
+ it ( "line: 1417 - matches a.b against 'a\nb '" , ( ) => {
1997
2026
const match = exec ( "a.b" , "a\nb " , "s" ) ;
1998
2027
expect ( match . matches [ 0 ] ) . toBe ( "a\nb " . substring ( 0 , 3 ) ) ;
1999
2028
} ) ;
2000
2029
it ( "line: 1418 - matches a[^a]b against 'acb'" , ( ) => {
2001
2030
const match = exec ( "a[^a]b" , "acb" , "s" ) ;
2002
2031
expect ( match . matches [ 0 ] ) . toBe ( "acb" . substring ( 0 , 3 ) ) ;
2003
2032
} ) ;
2004
- it ( "line: 1419 - matches a[^a]b against 'a\\ nb '" , ( ) => {
2033
+ it ( "line: 1419 - matches a[^a]b against 'a\nb '" , ( ) => {
2005
2034
const match = exec ( "a[^a]b" , "a\nb " , "s" ) ;
2006
2035
expect ( match . matches [ 0 ] ) . toBe ( "a\nb " . substring ( 0 , 3 ) ) ;
2007
2036
} ) ;
2008
2037
it ( "line: 1420 - matches a.b against 'acb'" , ( ) => {
2009
2038
const match = exec ( "a.b" , "acb" , "s" ) ;
2010
2039
expect ( match . matches [ 0 ] ) . toBe ( "acb" . substring ( 0 , 3 ) ) ;
2011
2040
} ) ;
2012
- it ( "line: 1421 - matches a.b against 'a\\ nb '" , ( ) => {
2041
+ it ( "line: 1421 - matches a.b against 'a\nb '" , ( ) => {
2013
2042
const match = exec ( "a.b" , "a\nb " , "s" ) ;
2014
2043
expect ( match . matches [ 0 ] ) . toBe ( "a\nb " . substring ( 0 , 3 ) ) ;
2015
2044
} ) ;
0 commit comments