(t *testing.T)
| 69 | } |
| 70 | |
| 71 | func TestPipelineSingleCommandWithStdout(t *testing.T) { |
| 72 | t.Parallel() |
| 73 | ctx := context.Background() |
| 74 | |
| 75 | stdout := &bytes.Buffer{} |
| 76 | |
| 77 | p := pipe.New(pipe.WithStdout(stdout)) |
| 78 | p.Add(pipe.Command("echo", "hello world")) |
| 79 | if assert.NoError(t, p.Run(ctx)) { |
| 80 | assert.Equal(t, "hello world\n", stdout.String()) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | func TestNontrivialPipeline(t *testing.T) { |
| 85 | t.Parallel() |