diff --git a/src/regex_impl.cc b/src/regex_impl.cc index f99fe5e0..e3b73df1 100644 --- a/src/regex_impl.cc +++ b/src/regex_impl.cc @@ -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));