优化测试用例

This commit is contained in:
刘祥超
2024-04-09 09:46:13 +08:00
parent 8e605cce67
commit 2d304b19b8

View File

@@ -76,6 +76,18 @@ func TestURLPattern_Match(t *testing.T) {
url: "/hidden/index.html",
result: false, // because don't have https://HOST in url
},
{
patternType: "wildcard",
pattern: "*.jpg",
url: "https://example.com/index.jpg",
result: true,
},
{
patternType: "wildcard",
pattern: "*.jpg",
url: "https://example.com/index.js",
result: false,
},
{
patternType: "regexp",
pattern: ".*",