summaryrefslogtreecommitdiffstats
path: root/modules/markdown
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-07-06 12:42:56 -0400
committerEthan Koenig <ethantkoenig@gmail.com>2017-07-06 12:46:31 -0400
commite14ea9979bf0e9a5d4dbfbf3e933997de8ac2987 (patch)
tree9650250bd6435d4f5cee8ee08fbaea4feddfed01 /modules/markdown
parentb1d7348a20d7d3927d526b15c1847db6dd7767fa (diff)
downloadgitea-e14ea9979bf0e9a5d4dbfbf3e933997de8ac2987.tar.gz
gitea-e14ea9979bf0e9a5d4dbfbf3e933997de8ac2987.zip
Relative URL tests
Diffstat (limited to 'modules/markdown')
-rw-r--r--modules/markdown/markdown_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/markdown/markdown_test.go b/modules/markdown/markdown_test.go
index 9a1dafa713..c622009e82 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...))
}