From e14ea9979bf0e9a5d4dbfbf3e933997de8ac2987 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Thu, 6 Jul 2017 12:42:56 -0400 Subject: [PATCH] Relative URL tests --- modules/markdown/markdown_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/markdown/markdown_test.go b/modules/markdown/markdown_test.go index 9a1dafa71..c622009e8 100644 --- a/modules/markdown/markdown_test.go +++ b/modules/markdown/markdown_test.go @@ -75,6 +75,10 @@ func TestURLJoin(t *testing.T) { "https://try.gitea.io/", "/a/b/", "/c/"), newTest("https://try.gitea.io/a/c", "https://try.gitea.io/", "/a/./b/", "../c/"), + newTest("a/b/c", + "a", "b/c/"), + newTest("a/b/d", + "a/", "b/c/", "/../d/"), } { assert.Equal(t, test.Expected, URLJoin(test.Base, test.Elements...)) }