hugo/hugolib/path_separators_windows_test.go
Anthony Fok 67df33f500 Correct initialisms as suggested by golint
First step to use initialisms that golint suggests,
for example:

    Line 116: func GetHtmlRenderer should be GetHTMLRenderer

as see on http://goreportcard.com/report/spf13/hugo

Thanks to @bep for the idea!

Note that command-line flags (cobra and pflag)
as well as struct fields like .BaseUrl and .Url
that are used in Go HTML templates need more work
to maintain backward-compatibility, and thus
are NOT yet dealt with in this commit.

First step in fixing #959.
2015-03-11 21:55:00 +01:00

18 lines
447 B
Go

package hugolib
import (
"github.com/spf13/hugo/tpl"
"testing"
)
const (
win_base = "c:\\a\\windows\\path\\layout"
win_path = "c:\\a\\windows\\path\\layout\\sub1\\index.html"
)
func TestTemplatePathSeparator(t *testing.T) {
tmpl := new(tpl.GoHTMLTemplate)
if name := tmpl.GenerateTemplateNameFrom(win_base, win_path); name != "sub1/index.html" {
t.Fatalf("Template name incorrect. Expected: %s, Got: %s", "sub1/index.html", name)
}
}