mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-16 21:56:40 -05:00
fileserver: Add a couple test cases
With placeholders
This commit is contained in:
parent
05a4637489
commit
4e9ad50f65
1 changed files with 12 additions and 0 deletions
|
@ -62,6 +62,12 @@ func TestFileMatcher(t *testing.T) {
|
|||
expectedType: "file",
|
||||
matched: true,
|
||||
},
|
||||
{
|
||||
path: "/foo.txt?a=b",
|
||||
expectedPath: "/foo.txt",
|
||||
expectedType: "file",
|
||||
matched: true,
|
||||
},
|
||||
{
|
||||
path: "/foodir",
|
||||
expectedPath: "/foodir/",
|
||||
|
@ -211,6 +217,12 @@ func TestPHPFileMatcher(t *testing.T) {
|
|||
expectedType: "file",
|
||||
matched: false,
|
||||
},
|
||||
{
|
||||
path: "/index.php?path={path}&{query}",
|
||||
expectedPath: "/index.php",
|
||||
expectedType: "file",
|
||||
matched: true,
|
||||
},
|
||||
} {
|
||||
m := &MatchFile{
|
||||
fileSystem: osFS{},
|
||||
|
|
Loading…
Reference in a new issue