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

Function TestNontrivialPipeline

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

Source from the content-addressed store, hash-verified

82}
83
84func TestNontrivialPipeline(t *testing.T) {
85 t.Parallel()
86 ctx := context.Background()
87
88 p := pipe.New()
89 p.Add(
90 pipe.Command("echo", "hello world"),
91 pipe.Command("sed", "s/hello/goodbye/"),
92 )
93 out, err := p.Output(ctx)
94 if assert.NoError(t, err) {
95 assert.EqualValues(t, "goodbye world\n", out)
96 }
97}
98
99func TestPipelineReadFromSlowly(t *testing.T) {
100 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