diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-08-11 18:06:33 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-08-15 11:43:45 +0100 |
commit | 1a173be29d6ff8e9774b4a375b8de54d6849969c (patch) | |
tree | 404885ca2ae07d3c6fd75cadb79f190c0f1749a7 /Tests/LibRegex/Regex.cpp | |
parent | c3e1f1f687a3f2190cb666d73884b7884eeb5ad0 (diff) | |
download | serenity-1a173be29d6ff8e9774b4a375b8de54d6849969c.zip |
LibRegex: Disallow unescaped quantifiers in Unicode mode
Diffstat (limited to 'Tests/LibRegex/Regex.cpp')
-rw-r--r-- | Tests/LibRegex/Regex.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/LibRegex/Regex.cpp b/Tests/LibRegex/Regex.cpp index e77a90356e..9529ce790c 100644 --- a/Tests/LibRegex/Regex.cpp +++ b/Tests/LibRegex/Regex.cpp @@ -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) { |