MCPcopy
hub / github.com/github/git-sizer / TestPipelineTwoCommandsPiping

Function TestPipelineTwoCommandsPiping

internal/pipe/pipeline_test.go:174–185  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

172}
173
174func 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
187func TestPipelineDir(t *testing.T) {
188 t.Parallel()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.92
CommandFunction · 0.92
OutputMethod · 0.80
AddMethod · 0.65

Tested by

no test coverage detected