mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-12-22 15:47:59 +08:00
chore: add test case
This commit is contained in:
parent
f54bf2d935
commit
d4e48d709f
@ -43,6 +43,7 @@ func TestDomainWildcard(t *testing.T) {
|
||||
domainSet := []string{
|
||||
"*.*.*.baidu.com",
|
||||
"www.baidu.*",
|
||||
"stun.*.*",
|
||||
"*.*.qq.com",
|
||||
"test.*.baidu.com",
|
||||
}
|
||||
@ -51,7 +52,9 @@ func TestDomainWildcard(t *testing.T) {
|
||||
assert.True(t, set.Has("www.baidu.com"))
|
||||
assert.True(t, set.Has("test.test.baidu.com"))
|
||||
assert.True(t, set.Has("test.test.qq.com"))
|
||||
assert.True(t,set.Has("stun.ab.cd"))
|
||||
assert.False(t, set.Has("test.baidu.com"))
|
||||
assert.False(t,set.Has("www.google.com"))
|
||||
assert.False(t, set.Has("test.qq.com"))
|
||||
assert.False(t, set.Has("test.test.test.qq.com"))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user