mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-18 08:00:25 +08:00
提升通过域名查找服务的性能,轻松支持海量域名
This commit is contained in:
@@ -81,3 +81,14 @@ func TestMatchDomain(t *testing.T) {
|
||||
a.IsTrue(ok)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsSpecialDomain(t *testing.T) {
|
||||
var a = assert.NewAssertion(t)
|
||||
|
||||
a.IsTrue(IsFuzzyDomain(""))
|
||||
a.IsTrue(IsFuzzyDomain(".hello.com"))
|
||||
a.IsTrue(IsFuzzyDomain("*.hello.com"))
|
||||
a.IsTrue(IsFuzzyDomain("hello.*.com"))
|
||||
a.IsTrue(IsFuzzyDomain("~^hello\\.com"))
|
||||
a.IsFalse(IsFuzzyDomain("hello.com"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user