(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestParseStringFunctions(t *testing.T) { |
| 24 | tm, err := Parse(`{{join (split . ":") "/"}}`) |
| 25 | assert.NilError(t, err) |
| 26 | |
| 27 | var b bytes.Buffer |
| 28 | assert.NilError(t, tm.Execute(&b, "text:with:colon")) |
| 29 | want := "text/with/colon" |
| 30 | assert.Check(t, is.Equal(want, b.String())) |
| 31 | } |
| 32 | |
| 33 | func TestNewParse(t *testing.T) { |
| 34 | tm, err := New("foo").Parse("this is a {{ . }}") |