summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver/browsetplcontext_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/fileserver/browsetplcontext_test.go')
-rw-r--r--modules/caddyhttp/fileserver/browsetplcontext_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/caddyhttp/fileserver/browsetplcontext_test.go b/modules/caddyhttp/fileserver/browsetplcontext_test.go
index 01e6c8f..9f0d08e 100644
--- a/modules/caddyhttp/fileserver/browsetplcontext_test.go
+++ b/modules/caddyhttp/fileserver/browsetplcontext_test.go
@@ -36,6 +36,19 @@ func TestBreadcrumbs(t *testing.T) {
{Link: "../", Text: "quux"},
{Link: "", Text: "corge"},
}},
+ {"/مجلد/", []crumb{
+ {Link: "../", Text: "/"},
+ {Link: "", Text: "مجلد"},
+ }},
+ {"/مجلد-1/مجلد-2", []crumb{
+ {Link: "../../", Text: "/"},
+ {Link: "../", Text: "مجلد-1"},
+ {Link: "", Text: "مجلد-2"},
+ }},
+ {"/مجلد%2F1", []crumb{
+ {Link: "../", Text: "/"},
+ {Link: "", Text: "مجلد/1"},
+ }},
}
for _, d := range testdata {