(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestExecForEach_RunsEchoWithABCAndGetsOutputABC(t *testing.T) { |
| 67 | t.Parallel() |
| 68 | p := script.Echo("a\nb\nc\n").ExecForEach("echo {{.}}") |
| 69 | if p.Error() != nil { |
| 70 | t.Fatal(p.Error()) |
| 71 | } |
| 72 | want := "a\nb\nc\n" |
| 73 | got, err := p.String() |
| 74 | if err != nil { |
| 75 | t.Fatal(err) |
| 76 | } |
| 77 | if want != got { |
| 78 | t.Error(cmp.Diff(want, got)) |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | func TestExecForEach_CorrectlyEvaluatesTemplateContainingIfStatement(t *testing.T) { |
| 83 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…