1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

LibRegex: Disallow duplicate named capture groups in ECMA262 parser

This commit is contained in:
davidot 2021-12-19 02:31:21 +01:00 committed by Linus Groh
parent be3b806487
commit 733a70671b
4 changed files with 11 additions and 0 deletions

View file

@ -591,6 +591,8 @@ TEST_CASE(ECMA262_parse)
{ "a{9007199254740991,9007199254740992}"sv, regex::Error::InvalidBraceContent },
{ "a{9007199254740992,9007199254740991}"sv, regex::Error::InvalidBraceContent },
{ "a{9007199254740992,9007199254740992}"sv, regex::Error::InvalidBraceContent },
{ "(?<a>a)(?<a>b)"sv, regex::Error::DuplicateNamedCapture },
{ "(?<a>a)(?<b>b)(?<a>c)"sv, regex::Error::DuplicateNamedCapture },
};
for (auto& test : tests) {