~dvko/extemplate

e503fa84287fb51c18b3b7863891cbf5f7cfa318 — Danny van Kooten 3 years ago 388ab0c
fix newline characters in tests for windows?
2 files changed, 3 insertions(+), 2 deletions(-)

M example_test.go
M template_test.go
M example_test.go => example_test.go +2 -2
@@ 14,6 14,6 @@ func ExampleExtemplate_ParseDir() {
	})
	_ = xt.ParseDir("examples", []string{".tmpl"})
	_ = xt.ExecuteTemplate(os.Stdout, "child.tmpl", nil)
	// Output: Hello from child.tmpl
	//	Hello from partials/question.tmpl
	/* Output: Hello from child.tmpl
	Hello from partials/question.tmpl */
}

M template_test.go => template_test.go +1 -0
@@ 67,6 67,7 @@ func TestTemplates(t *testing.T) {
		}

		e := strings.TrimSpace(buf.String())
		e = strings.Replace(e, "\r\n", "\n", -1)
		if e != v {
			t.Errorf("incorrect template result. \nExpected: %s\nActual: %s", v, e)
		}