From d4e48d709f7185c0c5b809c702fa53f62944e849 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Sat, 1 Apr 2023 11:21:38 +0800 Subject: [PATCH] chore: add test case --- component/trie/set_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/component/trie/set_test.go b/component/trie/set_test.go index 62854a14..346bb31a 100644 --- a/component/trie/set_test.go +++ b/component/trie/set_test.go @@ -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")) }