(t *testing.T)
| 217 | } |
| 218 | |
| 219 | func 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 |
nothing calls this directly
no test coverage detected