summaryrefslogtreecommitdiffstats
path: root/hugolib/site_url_test.go
diff options
context:
space:
mode:
authorNoah Campbell <noahcampbell@gmail.com>2013-09-12 10:48:59 -0700
committerNoah Campbell <noahcampbell@gmail.com>2013-09-12 10:48:59 -0700
commit74b55fc7c87f2887c42ce8626cb461fee5d7b907 (patch)
treefd071f824ac14cff6ddaf9c9582a65843a6ab316 /hugolib/site_url_test.go
parent998b2f73f8da8886be87c29e23623d24445cbe93 (diff)
Normalize paths within hugo
filepath was used inconsistently throughout the hugolib. With the introduction of source and target modules, all path are normalized to "/". This simplifies the processing of paths. It does mean that contributors need to be aware of using path/filepath in any module other than source or target is not recommended. The current exception is hugolib/config.go
Diffstat (limited to 'hugolib/site_url_test.go')
-rw-r--r--hugolib/site_url_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/hugolib/site_url_test.go b/hugolib/site_url_test.go
index e506ee66b..f6098634b 100644
--- a/hugolib/site_url_test.go
+++ b/hugolib/site_url_test.go
@@ -3,7 +3,6 @@ package hugolib
import (
"bytes"
"io"
- "path/filepath"
"strings"
"testing"
)
@@ -49,8 +48,8 @@ func TestPageCount(t *testing.T) {
s := &Site{Target: target}
s.prepTemplates()
must(s.addTemplate("indexes/blue.html", INDEX_TEMPLATE))
- s.Pages = append(s.Pages, mustReturn(ReadFrom(strings.NewReader(SLUG_DOC_1), filepath.FromSlash("content/blue/doc1.md"))))
- s.Pages = append(s.Pages, mustReturn(ReadFrom(strings.NewReader(SLUG_DOC_2), filepath.FromSlash("content/blue/doc2.md"))))
+ s.Pages = append(s.Pages, mustReturn(ReadFrom(strings.NewReader(SLUG_DOC_1), "content/blue/doc1.md")))
+ s.Pages = append(s.Pages, mustReturn(ReadFrom(strings.NewReader(SLUG_DOC_2), "content/blue/doc2.md")))
if err := s.BuildSiteMeta(); err != nil {
t.Errorf("Unable to build site metadata: %s", err)
@@ -60,7 +59,7 @@ func TestPageCount(t *testing.T) {
t.Errorf("Unable to render site lists: %s", err)
}
- blueIndex := target.files["blue/index.html"]
+ blueIndex := target.files["blue"]
if blueIndex == nil {
t.Errorf("No indexed rendered. %v", target.files)
}