(t *testing.T)
| 172 | } |
| 173 | |
| 174 | func TestPipelineTwoCommandsPiping(t *testing.T) { |
| 175 | t.Parallel() |
| 176 | ctx := context.Background() |
| 177 | |
| 178 | p := pipe.New() |
| 179 | p.Add(pipe.Command("echo", "hello world")) |
| 180 | assert.Panics(t, func() { p.Add(pipe.Command("")) }) |
| 181 | out, err := p.Output(ctx) |
| 182 | if assert.NoError(t, err) { |
| 183 | assert.EqualValues(t, "hello world\n", out) |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | func TestPipelineDir(t *testing.T) { |
| 188 | t.Parallel() |