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

Function TestWaitReadsPipeSourceToCompletion

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

Source from the content-addressed store, hash-verified

1692}
1693
1694func TestWaitReadsPipeSourceToCompletion(t *testing.T) {
1695 t.Parallel()
1696 source := bytes.NewBufferString("hello")
1697 script.NewPipe().WithReader(source).FilterLine(strings.ToUpper).Wait()
1698 if source.Len() > 0 {
1699 t.Errorf("incomplete read: %d bytes of input remaining: %q", source.Len(), source.String())
1700 }
1701}
1702
1703func TestWriteFile_WritesInputToFileCreatingItIfNecessary(t *testing.T) {
1704 t.Parallel()

Callers

nothing calls this directly

Calls 5

NewPipeFunction · 0.92
WaitMethod · 0.80
FilterLineMethod · 0.80
WithReaderMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…