LibRegex: Account for uppercase characters in insensitive patterns

This commit is contained in:
Ali Mohammad Pur 2025-07-11 15:06:40 +02:00 committed by Jelle Raaijmakers
commit 5b45223d5f
Notes: github-actions[bot] 2025-07-12 09:27:33 +00:00
6 changed files with 73 additions and 31 deletions

View file

@ -736,6 +736,8 @@ TEST_CASE(ECMA262_match)
{ "(?!(b))\\1"sv, "a"sv, false },
// String table merge bug: inverse map should be merged regardless of available direct mappings.
{ "((?<x>a)|(?<x>b))"sv, "aa"sv, false },
// Insensitive charclasses should accept upper/lowercase in pattern (lookup table should still be ordered if insensitive lookup is used), ladybird#5399.
{ "[aBc]"sv, "b"sv, true, ECMAScriptFlags::Insensitive },
};
for (auto& test : tests) {