diff options
Diffstat (limited to 'modules/caddyhttp/matchers_test.go')
| -rw-r--r-- | modules/caddyhttp/matchers_test.go | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go index 3b5afd2..1e50776 100644 --- a/modules/caddyhttp/matchers_test.go +++ b/modules/caddyhttp/matchers_test.go @@ -252,6 +252,26 @@ func TestPathMatcher(t *testing.T) {  			input:  "/foo/BAR.txt",  			expect: true,  		}, +		{ +			match:  MatchPath{"*"}, +			input:  "/", +			expect: true, +		}, +		{ +			match:  MatchPath{"*"}, +			input:  "/foo/bar", +			expect: true, +		}, +		{ +			match:  MatchPath{"**"}, +			input:  "/", +			expect: true, +		}, +		{ +			match:  MatchPath{"**"}, +			input:  "/foo/bar", +			expect: true, +		},  	} {  		req := &http.Request{URL: &url.URL{Path: tc.input}}  		repl := caddy.NewReplacer() | 
