MCPcopy Create free account
hub / github.com/docker/cli / TestParseStringFunctions

Function TestParseStringFunctions

templates/templates_test.go:23–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21}
22
23func 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
33func TestNewParse(t *testing.T) {
34 tm, err := New("foo").Parse("this is a {{ . }}")

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…