(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestExecRunsShWithEchoHelloAndGetsOutputHello(t *testing.T) { |
| 26 | t.Parallel() |
| 27 | p := script.Exec("sh -c 'echo hello'") |
| 28 | if p.Error() != nil { |
| 29 | t.Fatal(p.Error()) |
| 30 | } |
| 31 | want := "hello\n" |
| 32 | got, err := p.String() |
| 33 | if err != nil { |
| 34 | t.Fatal(err) |
| 35 | } |
| 36 | if want != got { |
| 37 | t.Error(cmp.Diff(want, got)) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func TestExecRunsShWithinShWithEchoInceptionAndGetsOutputInception(t *testing.T) { |
| 42 | t.Parallel() |