mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibRegex: Support property escapes of the form \p{Type=Value}
Before now, only binary properties could be parsed. Non-binary props are of the form "Type=Value", where "Type" may be General_Category, Script, or Script_Extension (or their aliases). Of these, LibUnicode currently supports General_Category, so LibRegex can parse only that type.
This commit is contained in:
parent
011514a384
commit
4de4312827
Notes:
sideshowbarker
2024-07-18 07:34:19 +09:00
Author: https://github.com/trflynn89
Commit: 4de4312827
Pull-request: https://github.com/SerenityOS/serenity/pull/9142
Reviewed-by: https://github.com/alimpfard
2 changed files with 40 additions and 11 deletions
|
@ -667,6 +667,12 @@ TEST_CASE(ECMA262_property_match)
|
|||
{ "\\p{Cased_Letter}", "a", true, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{Cased_Letter}", "A", true, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{Cased_Letter}", "9", false, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{General_Category=Cased_Letter}", "a", true, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{General_Category=Cased_Letter}", "A", true, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{General_Category=Cased_Letter}", "9", false, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{gc=Cased_Letter}", "a", true, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{gc=Cased_Letter}", "A", true, ECMAScriptFlags::Unicode },
|
||||
{ "\\p{gc=Cased_Letter}", "9", false, ECMAScriptFlags::Unicode },
|
||||
};
|
||||
|
||||
for (auto& test : tests) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue