LibRegex: Fail early if eof seen after '(?'

Fixes #4583.
This commit is contained in:
AnotherTest 2020-12-28 09:07:17 +03:30 committed by Andreas Kling
commit ee1d9217aa
Notes: sideshowbarker 2024-07-19 00:30:09 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -500,6 +500,7 @@ TEST_CASE(ECMA262_parse)
{ "(?", regex::Error::InvalidCaptureGroup },
{ "\\u1234", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
{ "[\\u1234]", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
{ ",(?", regex::Error::InvalidCaptureGroup }, // #4583
};
for (auto& test : tests) {