mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibRegex: Don't treat ForkReplace* as new forks
This commit is contained in:
parent
0ea399d8d6
commit
00326a63ed
Notes:
sideshowbarker
2024-07-17 04:38:31 +09:00
Author: https://github.com/alimpfard
Commit: 00326a63ed
Pull-request: https://github.com/SerenityOS/serenity/pull/15997
2 changed files with 15 additions and 4 deletions
|
@ -1067,6 +1067,12 @@ TEST_CASE(negative_lookahead)
|
|||
EXPECT_EQ(re.match(":1"sv).success, false);
|
||||
EXPECT_EQ(re.match(":foobar"sv).success, true);
|
||||
}
|
||||
{
|
||||
// Correctly count forks with nested groups and optimised loops
|
||||
Regex<ECMA262> re("^((?:[^\\n]|\\n(?! *\\n))+)(?:\\n *)+\\n");
|
||||
EXPECT_EQ(re.match("foo\n\n"sv).success, true);
|
||||
EXPECT_EQ(re.match("foo\n"sv).success, false);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE(single_match_flag)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue