diff options
author | Nate Finch <nate.finch@gmail.com> | 2014-08-22 07:59:59 -0400 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2014-08-25 11:51:51 -0400 |
commit | a31edb3388606eb231261780d91e1324c50b2953 (patch) | |
tree | 3b4189b0240765210b3fce4525665b28d209f5d4 /hugolib/page_permalink_test.go | |
parent | 4b979b17cc3af0d6da3026a2ca02b525133b6d3f (diff) |
Support subdir in baseurl.
Mainly this was a change to helpers.MakePermalink, but to get the local server to run correctly,
we needed to redirect the path of the request from /foo to /. In addition, I added tests for the
server's code for fixing up the base url with different config file & CLI options.
Diffstat (limited to 'hugolib/page_permalink_test.go')
-rw-r--r-- | hugolib/page_permalink_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hugolib/page_permalink_test.go b/hugolib/page_permalink_test.go index 51306fade..be88c2faf 100644 --- a/hugolib/page_permalink_test.go +++ b/hugolib/page_permalink_test.go @@ -33,7 +33,7 @@ func TestPermalink(t *testing.T) { {"x/y/z/boofar.md", "x/y/z", "", "", "/z/y/q/", false, "/z/y/q/", "/z/y/q/"}, } - for _, test := range tests { + for i, test := range tests { viper.Set("uglyurls", test.uglyurls) p := &Page{ Node: Node{ @@ -56,22 +56,22 @@ func TestPermalink(t *testing.T) { u, err := p.Permalink() if err != nil { - t.Errorf("Unable to process permalink: %s", err) + t.Errorf("Test %d: Unable to process permalink: %s", i, err) } expected := test.expectedAbs if u != expected { - t.Errorf("Expected abs url: %s, got: %s", expected, u) + t.Errorf("Test %d: Expected abs url: %s, got: %s", i, expected, u) } u, err = p.RelPermalink() if err != nil { - t.Errorf("Unable to process permalink: %s", err) + t.Errorf("Test %d: Unable to process permalink: %s", i, err) } expected = test.expectedRel if u != expected { - t.Errorf("Expected abs url: %s, got: %s", expected, u) + t.Errorf("Test %d: Expected abs url: %s, got: %s", i, expected, u) } } } |