mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibRegex: Parse capture group names according to the ECMA262 spec
This commit is contained in:
parent
733a70671b
commit
154ed3994c
Notes:
sideshowbarker
2024-07-17 22:31:05 +09:00
Author: https://github.com/davidot
Commit: 154ed3994c
Pull-request: https://github.com/SerenityOS/serenity/pull/11316
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/linusg ✅
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