diff options
Diffstat (limited to 'modules/util/util_test.go')
-rw-r--r-- | modules/util/util_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/util/util_test.go b/modules/util/util_test.go index 67d9efe1d2..0d79df6050 100644 --- a/modules/util/util_test.go +++ b/modules/util/util_test.go @@ -32,6 +32,12 @@ func TestURLJoin(t *testing.T) { "a/", "b/c/", "/../d/"), newTest("https://try.gitea.io/a/b/c#d", "https://try.gitea.io", "a/b", "c#d"), + newTest("/a/b/d", + "/a/", "b/c/", "/../d/"), + newTest("/a/b/c", + "/a", "b/c/"), + newTest("/a/b/c#hash", + "/a", "b/c#hash"), } { assert.Equal(t, test.Expected, URLJoin(test.Base, test.Elements...)) } |