MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / TestLoadPipeToBufferAsync

Function TestLoadPipeToBufferAsync

io_test.go:219–237  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

217}
218
219func TestLoadPipeToBufferAsync(t *testing.T) {
220 csvData := "Name,Age,City\nJohn,30,NYC\nJane,25,LA\n"
221 reader := strings.NewReader(csvData)
222
223 b := createNewBuffer()
224 updateChan := make(chan bool, 10)
225 doneChan := make(chan error, 1)
226
227 go loadPipeToBufferAsync(reader, b, updateChan, doneChan)
228
229 err := <-doneChan
230 if err != nil {
231 t.Fatalf("loadPipeToBufferAsync() error = %v", err)
232 }
233
234 if b.rowLen == 0 {
235 t.Error("Expected data to be loaded")
236 }
237}
238
239// ========================================
240// Line Filtering Tests

Callers

nothing calls this directly

Calls 2

createNewBufferFunction · 0.85
loadPipeToBufferAsyncFunction · 0.85

Tested by

no test coverage detected