Skip to content

Commit

Permalink
test: enable PipeTo test (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Lindamood authored Mar 26, 2024
1 parent 8a60419 commit 7c04edc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pipe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ func TestEnv(t *testing.T) {
require.NoError(t, pipe.Shell("GONOSUMDB=testing env").Execute(context.Background(), nil, &buf, nil))
require.Contains(t, buf.String(), "testing")
}

func TestPipeTo(t *testing.T) {
var buf bytes.Buffer
require.NoError(t, pipe.Shell("echo hi").PipeTo(pipe.NewPiped("cat")).Execute(context.Background(), nil, &buf, nil))
require.Contains(t, buf.String(), "hi")
}

0 comments on commit 7c04edc

Please sign in to comment.