(t *testing.T)
| 306 | } |
| 307 | |
| 308 | func TestEchoReplacesInputWithSuppliedStringWhenUsedAsFilter(t *testing.T) { |
| 309 | t.Parallel() |
| 310 | want := "Hello, world." |
| 311 | p := script.Echo("bogus").Echo(want) |
| 312 | got, err := p.String() |
| 313 | if err != nil { |
| 314 | t.Fatal(err) |
| 315 | } |
| 316 | if got != want { |
| 317 | t.Errorf("want %q, got %q", want, got) |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | func TestExecForEach_ErrorsOnInvalidTemplateSyntax(t *testing.T) { |
| 322 | t.Parallel() |