mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-03-11 09:01:12 -04:00
Add test for middomain
This commit is contained in:
parent
651e74fe08
commit
4cc156c011
test/unit
@ -279,6 +279,17 @@ TEST(UrlMatchListTest, DomainHostSuffix) {
|
||||
EXPECT_FALSE(urlMatchList.isUrlMatched("http://jostsuffix06.a.se"));
|
||||
}
|
||||
|
||||
TEST(UrlMatchListTest, Middomain) {
|
||||
TestUrlMatchList urlMatchList("blocklist/middomain.txt");
|
||||
urlMatchList.load();
|
||||
|
||||
//middomain example
|
||||
EXPECT_TRUE(urlMatchList.isUrlMatched("http://www.example.co.uk"));
|
||||
EXPECT_TRUE(urlMatchList.isUrlMatched("http://www.example.dk/abc.html"));
|
||||
EXPECT_TRUE(urlMatchList.isUrlMatched("https://www.example.com/"));
|
||||
EXPECT_TRUE(urlMatchList.isUrlMatched("https://sub.example.com/"));
|
||||
}
|
||||
|
||||
TEST(UrlMatchListTest, PathPath) {
|
||||
TestUrlMatchList urlMatchList("blocklist/path.txt");
|
||||
urlMatchList.load();
|
||||
|
1
test/unit/blocklist/middomain.txt
Normal file
1
test/unit/blocklist/middomain.txt
Normal file
@ -0,0 +1 @@
|
||||
middomain example
|
Loading…
Reference in New Issue
Block a user