shithub: hugo

ref: bc3c2290027359206f3569bcd51447443f7b40bb
dir: /hugolib/path_seperators_windows_test.go/

View raw version
package hugolib

import (
	"testing"
)

func TestTemplatePathSeperator(t *testing.T) {
	config := Config{
		LayoutDir: "c:\\a\\windows\\path\\layout",
		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" {
		t.Fatalf("Template name incorrect.  Expected: %s, Got: %s", "sub1/index.html", name)
	}
}