From 7574cf9ada4c32b248bf80ef87ede08142ee4654 Mon Sep 17 00:00:00 2001
From: bab2min <bab2min@gmail.com>
Date: Thu, 5 Sep 2024 01:07:02 +0900
Subject: [PATCH] Add the test case

---
 test/test_cpp.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/test_cpp.cpp b/test/test_cpp.cpp
index 50bda190..4a437e8c 100644
--- a/test/test_cpp.cpp
+++ b/test/test_cpp.cpp
@@ -1484,3 +1484,16 @@ TEST(KiwiCpp, NestedSentenceSplit)
 		EXPECT_EQ(ranges.size(), 1);
 	}
 }
+
+TEST(KiwiCpp, IssueP172_LengthError)
+{
+	std::u16string text;
+	text += u"\n";
+	for (int i = 0; i < 4000; ++i)
+	{
+		text += u"좋은채팅사이트《35141561234.wang.com》";
+	}
+	Kiwi& kiwi = reuseKiwiInstance();
+	auto res = kiwi.analyze(text, Match::allWithNormalizing).first;
+	EXPECT_GT(res.size(), 0);
+}