优化测试用例

This commit is contained in:
GoEdgeLab
2024-04-09 09:46:13 +08:00
parent 02da679efe
commit 360b05289b

View File

@@ -76,6 +76,18 @@ func TestURLPattern_Match(t *testing.T) {
url: "/hidden/index.html", url: "/hidden/index.html",
result: false, // because don't have https://HOST in url 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", patternType: "regexp",
pattern: ".*", pattern: ".*",