diff options
author | Zufu Liu <unknown> | 2023-11-21 11:29:30 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2023-11-21 11:29:30 +1100 |
commit | df54de37b0a372a49bed0130406a5b75b85cd119 (patch) | |
tree | f791035b94ff1554ca851087d6020c501ad333c9 /test | |
parent | 1348727852f4f9d517245ad9b20bf3c056af47ec (diff) | |
download | scintilla-mirror-df54de37b0a372a49bed0130406a5b75b85cd119.tar.gz |
Bug [#2413]. Fix regular expression search failure.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/testRESearch.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/testRESearch.cxx b/test/unit/testRESearch.cxx index 781d776a4..9bc1b43bb 100644 --- a/test/unit/testRESearch.cxx +++ b/test/unit/testRESearch.cxx @@ -60,6 +60,17 @@ TEST_CASE("RESearch") { REQUIRE(nullptr == msg); } + SECTION("Bug2413") { + // Check for https://sourceforge.net/p/scintilla/bugs/2413/ + std::unique_ptr<RESearch> re = std::make_unique<RESearch>(&cc); + constexpr std::string_view BOW = "\\<"; + constexpr std::string_view EOW = "\\>"; + const char *msg = re->Compile(BOW.data(), BOW.length(), true, false); + REQUIRE(nullptr == msg); + msg = re->Compile(EOW.data(), EOW.length(), true, false); + REQUIRE(nullptr == msg); + } + SECTION("Execute") { std::unique_ptr<RESearch> re = std::make_unique<RESearch>(&cc); re->Compile(pattern.data(), pattern.length(), true, false); |