diff options
Diffstat (limited to 'modules/caddyhttp/fileserver/matcher_test.go')
-rw-r--r-- | modules/caddyhttp/fileserver/matcher_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/caddyhttp/fileserver/matcher_test.go b/modules/caddyhttp/fileserver/matcher_test.go index ddd4f78..e319907 100644 --- a/modules/caddyhttp/fileserver/matcher_test.go +++ b/modules/caddyhttp/fileserver/matcher_test.go @@ -206,9 +206,13 @@ func TestPHPFileMatcher(t *testing.T) { func TestFirstSplit(t *testing.T) { m := MatchFile{SplitPath: []string{".php"}} - actual := m.firstSplit("index.PHP/somewhere") + actual, remainder := m.firstSplit("index.PHP/somewhere") expected := "index.PHP" + expectedRemainder := "/somewhere" if actual != expected { - t.Errorf("Expected %s but got %s", expected, actual) + t.Errorf("Expected split %s but got %s", expected, actual) + } + if remainder != expectedRemainder { + t.Errorf("Expected remainder %s but got %s", expectedRemainder, remainder) } } |