mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
LibRegex: Ensure escaped hexadecimals are exactly 2 digits in length
This commit is contained in:
parent
2e4b6fd1ac
commit
0c8f2f5aca
2 changed files with 6 additions and 2 deletions
|
@ -499,6 +499,10 @@ TEST_CASE(ECMA262_parse)
|
|||
{ "\\/" }, // #4189
|
||||
{ ",/=-:" }, // #4243
|
||||
{ "\\x" }, // Even invalid escapes are allowed if ~unicode.
|
||||
{ "\\x1" }, // Even invalid escapes are allowed if ~unicode.
|
||||
{ "\\x1", regex::Error::InvalidPattern, regex::ECMAScriptFlags::Unicode },
|
||||
{ "\\x11" },
|
||||
{ "\\x11", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
|
||||
{ "\\", regex::Error::InvalidTrailingEscape },
|
||||
{ "(?", regex::Error::InvalidCaptureGroup },
|
||||
{ "\\u1234", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue