}
func TestNewPageWithFilePath(t *testing.T) {
- toCheck := []struct{
- input string
+ toCheck := []struct {
+ input string
section string
- layout string
+ layout string
}{
{filepath.Join("sub", "foobar.html"), "sub", "sub/single.html"},
{filepath.Join("content", "sub", "foobar.html"), "sub", "sub/single.html"},
}
}
}
-
-
func TestTemplatePathSeperator(t *testing.T) {
config := Config{
LayoutDir: "c:\\a\\windows\\path\\layout",
- Path: "c:\\a\\windows\\path",
+ Path: "c:\\a\\windows\\path",
}
s := &Site{Config: config}
if name := s.generateTemplateNameFrom("c:\\a\\windows\\path\\layout\\sub1\\index.html"); name != "sub1/index.html" {