hugo/hugolib/path_separators_windows_test.go
bep a52e508d46 Update test logs for uniformity and consistency
Many minor fixes to make test logs more consistent and correct a
mispelling.

Standardize on "[%i] got X but expected Y" for log messages. Using
a consistent layout makes it easier to read the test results. This
was mostly changing "Got" to "got". Swapped the order of values on
several calls to bring them in line with the convention.

A few log messages had a sequence number added to identify the
exact scenario that failed. Otherwise, there would be no way to
ascertain which failed When there are many scenarios.

Correct spelling of "expected."

Fixes #1028
Merged be2097e1ad

[close #1040]
2015-05-08 22:27:00 -04: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. got %s but expected %s", name, "sub1/index.html")
}
}