mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibRegex: Parse capture group names according to the ECMA262 spec
This commit is contained in:
parent
733a70671b
commit
154ed3994c
2 changed files with 96 additions and 10 deletions
|
@ -593,6 +593,12 @@ TEST_CASE(ECMA262_parse)
|
|||
{ "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 },
|
||||
{ "(?<1a>a)"sv, regex::Error::InvalidNameForCaptureGroup },
|
||||
{ "(?<\\a>a)"sv, regex::Error::InvalidNameForCaptureGroup },
|
||||
{ "(?<\ta>a)"sv, regex::Error::InvalidNameForCaptureGroup },
|
||||
{ "(?<$$_$$>a)"sv },
|
||||
{ "(?<ÿ>a)"sv },
|
||||
{ "(?<𝓑𝓻𝓸𝔀𝓷>a)"sv },
|
||||
};
|
||||
|
||||
for (auto& test : tests) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue