Regex: add a unit test for why lookaheads dont count for start chars anymore
This commit is contained in:
parent
87eec79d07
commit
d44e160aa7
|
@ -1264,6 +1264,12 @@ auto test_regex = UnitTest{[]{
|
|||
kak_assert(vm.exec("foo", RegexExecFlags::Search));
|
||||
}
|
||||
|
||||
{
|
||||
TestVM<> vm{R"(.?(?=foo))"};
|
||||
kak_assert(vm.exec("afoo", RegexExecFlags::Search));
|
||||
kak_assert(*vm.captures()[0] == 'a');
|
||||
}
|
||||
|
||||
{
|
||||
TestVM<> vm{R"((?i)(?=Foo))"};
|
||||
kak_assert(vm.exec("fOO", RegexExecFlags::Search));
|
||||
|
|
Loading…
Reference in New Issue
Block a user