mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	优化测试用例
This commit is contained in:
		@@ -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:     ".*",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user