summaryrefslogtreecommitdiffstats
path: root/hugolib/path_separators_windows_test.go
blob: 8b2cbacfe316698dd4b7f28b67a35517daebb703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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. got %s but expected %s", name, "sub1/index.html")
	}
}