(t *testing.T)
| 124 | } |
| 125 | |
| 126 | func TestBasicRunWait(t *testing.T) { |
| 127 | t.Parallel() |
| 128 | |
| 129 | command := &com.Command{ |
| 130 | Binary: "printf", |
| 131 | Args: []string{"one"}, |
| 132 | } |
| 133 | |
| 134 | err := command.Run(context.WithValue(context.Background(), com.LoggerKey, t)) |
| 135 | |
| 136 | assertive.ErrorIsNil(t, err, "Err") |
| 137 | |
| 138 | res, err := command.Wait() |
| 139 | |
| 140 | assertive.ErrorIsNil(t, err, "Err") |
| 141 | assertive.IsEqual(t, 0, res.ExitCode, "ExitCode") |
| 142 | assertive.IsEqual(t, "one", res.Stdout, "Stdout") |
| 143 | assertive.IsEqual(t, "", res.Stderr, "Stderr") |
| 144 | } |
| 145 | |
| 146 | func TestBasicFail(t *testing.T) { |
| 147 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…