@marcel91200 / caddy Mirror · read-only / commits / 4e9ad50f
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 08:00 UTC

fileserver: Add a couple test cases

With placeholders

Matthew Holt committed Jan 4, 2023 at 11:07 UTC 4e9ad50f6503a347e85b7030afa616a83f145394
1 file changed +12
modules/caddyhttp/fileserver/matcher_test.go
+12
@@ -62,6 +62,12 @@ func TestFileMatcher(t *testing.T) {
62 expectedType: "file",
63 matched: true,
64 },
65 + {
66 + path: "/foo.txt?a=b",
67 + expectedPath: "/foo.txt",
68 + expectedType: "file",
69 + matched: true,
70 + },
71 {
72 path: "/foodir",
73 expectedPath: "/foodir/",
@@ -211,6 +217,12 @@ func TestPHPFileMatcher(t *testing.T) {
217 expectedType: "file",
218 matched: false,
219 },
220 + {
221 + path: "/index.php?path={path}&{query}",
222 + expectedPath: "/index.php",
223 + expectedType: "file",
224 + matched: true,
225 + },
226 } {
227 m := &MatchFile{
228 fileSystem: osFS{},