diff --git a/externalsort/io_test.go b/externalsort/io_test.go index 129677f..c4bb5f6 100644 --- a/externalsort/io_test.go +++ b/externalsort/io_test.go @@ -21,6 +21,9 @@ func readAll(r LineReader) (lines []string, err error) { l, err := r.ReadLine() if err != nil { if errors.Is(err, io.EOF) { + if l != "" { + lines = append(lines, l) + } return lines, nil } return nil, err