aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/testRESearch.cxx11
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);