mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibRegex: Disallow unescaped quantifiers in Unicode mode
This commit is contained in:
parent
c3e1f1f687
commit
1a173be29d
2 changed files with 9 additions and 0 deletions
|
@ -559,6 +559,12 @@ TEST_CASE(ECMA262_parse)
|
|||
{ "[\\00]"sv, regex::Error::InvalidPattern, combine_flags(ECMAScriptFlags::Unicode, ECMAScriptFlags::BrowserExtended) },
|
||||
{ "\\^\\$\\\\\\.\\*\\+\\?\\(\\)\\[\\]\\{\\}\\|\\/"sv, regex::Error::NoError, ECMAScriptFlags::Unicode },
|
||||
{ "[\\^\\$\\\\\\.\\*\\+\\?\\(\\)\\[\\]\\{\\}\\|\\/]"sv, regex::Error::NoError, ECMAScriptFlags::Unicode },
|
||||
{ "]"sv, regex::Error::NoError, ECMAScriptFlags::BrowserExtended },
|
||||
{ "]"sv, regex::Error::InvalidPattern, ECMAScriptFlags::Unicode },
|
||||
{ "\\]"sv, regex::Error::NoError, ECMAScriptFlags::Unicode },
|
||||
{ "}"sv, regex::Error::NoError, ECMAScriptFlags::BrowserExtended },
|
||||
{ "}"sv, regex::Error::InvalidPattern, ECMAScriptFlags::Unicode },
|
||||
{ "\\}"sv, regex::Error::NoError, ECMAScriptFlags::Unicode },
|
||||
};
|
||||
|
||||
for (auto& test : tests) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue