summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-08-30 20:20:58 +0430
committerAndreas Kling <kling@serenityos.org>2021-08-30 18:43:09 +0200
commit206bc01f81f2efe0e8fb237149e3ce0556602e4b (patch)
tree1d67f4a80e01178beba33ee896d8ee487e5ec036 /Tests
parent0de35db0f19cad50dfb35660d4d860f7a55649cc (diff)
downloadserenity-206bc01f81f2efe0e8fb237149e3ce0556602e4b.zip
LibRegex: Allow null bytes in pattern
That check was rather pointless as the input is a StringView which knows its own bounds. Fixes #9686.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/LibRegex/Regex.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/LibRegex/Regex.cpp b/Tests/LibRegex/Regex.cpp
index d7630fb25d..97c201bb96 100644
--- a/Tests/LibRegex/Regex.cpp
+++ b/Tests/LibRegex/Regex.cpp
@@ -660,6 +660,7 @@ TEST_CASE(ECMA262_match)
{ "[\\0]"sv, "\0"sv, true, ECMAScriptFlags::BrowserExtended },
{ "[\\0]"sv, "\0"sv, true, combine_flags(ECMAScriptFlags::Unicode, ECMAScriptFlags::BrowserExtended) },
{ "[\\01]"sv, "\1"sv, true, ECMAScriptFlags::BrowserExtended },
+ { "(\0|a)"sv, "a"sv, true }, // #9686, Should allow null bytes in pattern
};
// clang-format on