(t *testing.T)
| 55 | } |
| 56 | |
| 57 | func TestCommandCancel(t *testing.T) { |
| 58 | ctx := log.Testing(t) |
| 59 | child, cancel := task.WithCancel(ctx) |
| 60 | cancel() |
| 61 | err := shell.Command("sleep", "1").Run(child) |
| 62 | assert.For(ctx, "err").ThatError(err).HasMessage(`Process returned error |
| 63 | Cause: context canceled`) |
| 64 | } |
| 65 | |
| 66 | func TestCommandCaptureStdout(t *testing.T) { |
| 67 | const expect = "echo to stdout\n" |
nothing calls this directly
no test coverage detected