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

LibRegex: Support property escapes of Unicode script extensions

This commit is contained in:
Timothy Flynn 2021-08-04 07:26:25 -04:00 committed by Linus Groh
parent 5edd458420
commit 484ccfadc3
5 changed files with 51 additions and 7 deletions

View file

@ -689,6 +689,12 @@ TEST_CASE(ECMA262_property_match)
{ "\\p{sc=Latin}", "a", true, ECMAScriptFlags::Unicode },
{ "\\p{sc=Latin}", "A", true, ECMAScriptFlags::Unicode },
{ "\\p{sc=Latin}", "9", false, ECMAScriptFlags::Unicode },
{ "\\p{Script_Extensions=Deva}", "a", false, ECMAScriptFlags::Unicode },
{ "\\p{Script_Extensions=Beng}", "\xe1\xb3\x95", true, ECMAScriptFlags::Unicode }, // U+01CD5
{ "\\p{Script_Extensions=Deva}", "\xe1\xb3\x95", true, ECMAScriptFlags::Unicode }, // U+01CD5
{ "\\p{scx=Deva}", "a", false, ECMAScriptFlags::Unicode },
{ "\\p{scx=Beng}", "\xe1\xb3\x95", true, ECMAScriptFlags::Unicode }, // U+01CD5
{ "\\p{scx=Deva}", "\xe1\xb3\x95", true, ECMAScriptFlags::Unicode }, // U+01CD5
};
for (auto& test : tests) {