LibRegex: Remove orphaned save points in nested LookAhead

This commit is contained in:
mikiubo 2025-03-12 13:53:44 +01:00 committed by Ali Mohammad Pur
commit c85df78c4c
Notes: github-actions[bot] 2025-03-17 15:12:04 +00:00
3 changed files with 27 additions and 0 deletions

View file

@ -738,6 +738,9 @@ TEST_CASE(ECMA262_match)
// Optimizer bug, ignoring an enabled trailing 'invert' when comparing blocks, ladybird#3421.
{ "[^]*[^]"sv, "i"sv, true },
{ "xx|...|...."sv, "cd"sv, false },
// Tests nested lookahead with alternation - verifies proper save/restore stack cleanup
{ "a(?=.(?=c)|b)b"sv, "ab"sv, true },
{ "(?=)(?=\\d)"sv, "smart"sv, false },
};
for (auto& test : tests) {