rib: do the longest-prefix match in self-learning route renew helper
Change-Id: I7f6f349fda6925dc3847716fed123d745f11b02a
refs: #4683
diff --git a/tests/rib/rib.t.cpp b/tests/rib/rib.t.cpp
index 420a82d..3b9840c 100644
--- a/tests/rib/rib.t.cpp
+++ b/tests/rib/rib.t.cpp
@@ -216,6 +216,12 @@
BOOST_CHECK(rib.find(name2, route2) == nullptr);
BOOST_CHECK(rib.find(name1, route1) != nullptr);
+ Name name5("/hello/world/666");
+ Name name6("/hello/world/cs/ua/edu");
+ BOOST_CHECK(rib.findLongestPrefix(name1, route1) != nullptr);
+ BOOST_CHECK(rib.findLongestPrefix(name5, route1) != nullptr);
+ BOOST_CHECK(rib.findLongestPrefix(name6, route1) != nullptr);
+
rib.erase(name1, route1);
BOOST_CHECK_EQUAL(rib.size(), 1);
}