nolint:errcheck
(t *testing.T)
| 24 | |
| 25 | //nolint:errcheck |
| 26 | func TestSplitWriter(t *testing.T) { |
| 27 | var lines []string |
| 28 | w := GetWriter(func(line string) { |
| 29 | lines = append(lines, line) |
| 30 | }) |
| 31 | w.Write([]byte("h")) |
| 32 | w.Write([]byte("e")) |
| 33 | w.Write([]byte("l")) |
| 34 | w.Write([]byte("l")) |
| 35 | w.Write([]byte("o")) |
| 36 | w.Write([]byte("\n")) |
| 37 | w.Write([]byte("world!\n")) |
| 38 | assert.DeepEqual(t, lines, []string{"hello", "world!"}) |
| 39 | } |