summaryrefslogtreecommitdiffstats
path: root/helpers/url_test.go
diff options
context:
space:
mode:
authorbep <bjorn.erik.pedersen@gmail.com>2014-12-07 19:48:00 +0100
committerspf13 <steve.francia@gmail.com>2014-12-09 09:43:15 -0500
commit9f77f93071d836a35b0078d1b349968abddb4a18 (patch)
tree909238a41b20b9e23324e4ffca01e8143655dd4a /helpers/url_test.go
parent3a8c12418a97230df714488e522f44ce8af685c5 (diff)
Fix various Windows-issues
File handling was broken on Windows. This commit contains a revision of the path handling with separation of file paths and urls where needed. There may be remaining issues and there may be better ways to do this, but it is easier to start that refactoring job with a set of passing tests. Fixes #687 Fixes #660
Diffstat (limited to 'helpers/url_test.go')
-rw-r--r--helpers/url_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/helpers/url_test.go b/helpers/url_test.go
index 4014ee343..1d5c770ea 100644
--- a/helpers/url_test.go
+++ b/helpers/url_test.go
@@ -69,14 +69,14 @@ func TestUrlPrep(t *testing.T) {
}
func TestPretty(t *testing.T) {
- assert.Equal(t, PrettifyPath("/section/name.html"), "/section/name/index.html")
- assert.Equal(t, PrettifyPath("/section/sub/name.html"), "/section/sub/name/index.html")
- assert.Equal(t, PrettifyPath("/section/name/"), "/section/name/index.html")
- assert.Equal(t, PrettifyPath("/section/name/index.html"), "/section/name/index.html")
- assert.Equal(t, PrettifyPath("/index.html"), "/index.html")
- assert.Equal(t, PrettifyPath("/name.xml"), "/name/index.xml")
- assert.Equal(t, PrettifyPath("/"), "/")
- assert.Equal(t, PrettifyPath(""), "/")
+ assert.Equal(t, PrettifyUrlPath("/section/name.html"), "/section/name/index.html")
+ assert.Equal(t, PrettifyUrlPath("/section/sub/name.html"), "/section/sub/name/index.html")
+ assert.Equal(t, PrettifyUrlPath("/section/name/"), "/section/name/index.html")
+ assert.Equal(t, PrettifyUrlPath("/section/name/index.html"), "/section/name/index.html")
+ assert.Equal(t, PrettifyUrlPath("/index.html"), "/index.html")
+ assert.Equal(t, PrettifyUrlPath("/name.xml"), "/name/index.xml")
+ assert.Equal(t, PrettifyUrlPath("/"), "/")
+ assert.Equal(t, PrettifyUrlPath(""), "/")
assert.Equal(t, PrettifyUrl("/section/name.html"), "/section/name")
assert.Equal(t, PrettifyUrl("/section/sub/name.html"), "/section/sub/name")
assert.Equal(t, PrettifyUrl("/section/name/"), "/section/name")