summaryrefslogtreecommitdiff
path: root/Tests/LibRegex
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-08-10 16:35:45 -0400
committerAndreas Kling <kling@serenityos.org>2021-08-11 13:11:01 +0200
commitdf14d11a11ba256dc8e7fcee4bffcdbc9934166f (patch)
tree2ec4eabbb5f44f2b1c722c0ea34c8794a1db40cd /Tests/LibRegex
parenta98d3a1a851330aa0d33a73031566ba04cf6b53c (diff)
downloadserenity-df14d11a11ba256dc8e7fcee4bffcdbc9934166f.zip
LibRegex: Disallow invalid interval qualifiers in Unicode mode
Fixes all remaining 'built-ins/RegExp/property-escapes' test262 tests.
Diffstat (limited to 'Tests/LibRegex')
-rw-r--r--Tests/LibRegex/Regex.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/LibRegex/Regex.cpp b/Tests/LibRegex/Regex.cpp
index dc7bad6b33..820d5401fa 100644
--- a/Tests/LibRegex/Regex.cpp
+++ b/Tests/LibRegex/Regex.cpp
@@ -522,6 +522,9 @@ TEST_CASE(ECMA262_parse)
{ "\\p{hello friends}", regex::Error::InvalidNameForProperty, ECMAScriptFlags::Unicode },
{ "\\p{Prepended_Concatenation_Mark}", regex::Error::InvalidNameForProperty, ECMAScriptFlags::Unicode },
{ "\\p{ASCII}", regex::Error::NoError, ECMAScriptFlags::Unicode },
+ { "\\\\p{1}", regex::Error::NoError, ECMAScriptFlags::Unicode },
+ { "\\\\p{AsCiI}", regex::Error::InvalidPattern, ECMAScriptFlags::Unicode },
+ { "\\\\p{ASCII}", regex::Error::InvalidPattern, ECMAScriptFlags::Unicode },
};
for (auto& test : tests) {