Skip to content

Commit b66c7d8

Browse files
committed
fixup! fix: last line is never sent
Signed-off-by: Yoan Blanc <[email protected]>
1 parent fe4165a commit b66c7d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ func TestStreamingMultipleLines(t *testing.T) {
559559
}
560560

561561
// Write two short lines
562-
input := "foo\nbar\n"
562+
input := "foo\nbar"
563563
n, err := out.Write([]byte(input))
564564
if n != len(input) {
565565
t.Errorf("Write n = %d, expected %d", n, len(input))
@@ -581,6 +581,8 @@ func TestStreamingMultipleLines(t *testing.T) {
581581
t.Errorf("got line: '%s', expected 'foo'", gotLine)
582582
}
583583

584+
out.Flush()
585+
584586
// Get next line
585587
select {
586588
case gotLine = <-lines:

0 commit comments

Comments
 (0)