func TestBasicEscaped(t *testing.T) { result := example.TMPLbasic("<aaa&...", 10) expected := `String:<aaa&... Unescaped:<aaa&... Num:10 This {{ is ignored So is this }} !` if explanation, ok := linesEquals(strings.TrimSpace(expected), strings.TrimSpace(result)); !ok { t.Error(explanation) } }
func TestBasic(t *testing.T) { result := example.TMPLbasic("aaa", 10) expected := `String:aaa Unescaped:aaa Num:10 This {{ is ignored So is this }} !` if strings.TrimSpace(expected) != strings.TrimSpace(result) { t.Error("Expected:", expected, "was:", result) } }