MCPcopy Index your code
hub / github.com/bitfield/script / TestTeeUsesConfiguredStdoutAsDefault

Function TestTeeUsesConfiguredStdoutAsDefault

script_test.go:1191–1203  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1189}
1190
1191func TestTeeUsesConfiguredStdoutAsDefault(t *testing.T) {
1192 t.Parallel()
1193 buf := new(bytes.Buffer)
1194 _, err := script.Echo("hello").WithStdout(buf).Tee().String()
1195 if err != nil {
1196 t.Fatal(err)
1197 }
1198 want := "hello"
1199 got := buf.String()
1200 if got != want {
1201 t.Errorf("want %q, got %q", want, got)
1202 }
1203}
1204
1205func TestTeeWritesDataToSuppliedWritersAsWellAsToPipe(t *testing.T) {
1206 t.Parallel()

Callers

nothing calls this directly

Calls 4

EchoFunction · 0.92
StringMethod · 0.80
TeeMethod · 0.80
WithStdoutMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…