aboutsummaryrefslogtreecommitdiff
path: root/src/bufio/bufio_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2025-01-26 21:52:58 -0800
committerGopher Robot <gobot@golang.org>2025-02-06 17:08:54 -0800
commit290ec2d92bca6472fdabce51fc331b3bcaa7129d (patch)
tree521de9734127e3ce5cae85a6931562054132a8eb /src/bufio/bufio_test.go
parent7c6b047ea14dcc6aa948f901956511c4e8691abf (diff)
downloadgo-290ec2d92bca6472fdabce51fc331b3bcaa7129d.tar.xz
bufio: don't do empty Write at start of WriteTo
The empty Write will cause the wrong thing to happen when using io.Copy to copy to a package-based stream. Fixes #71424 Change-Id: I046a27539447182692ac76a8bdd422327345dd8d Reviewed-on: https://go-review.googlesource.com/c/go/+/644535 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com> Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/bufio/bufio_test.go')
-rw-r--r--src/bufio/bufio_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bufio/bufio_test.go b/src/bufio/bufio_test.go
index 63dd2ea432..742e195425 100644
--- a/src/bufio/bufio_test.go
+++ b/src/bufio/bufio_test.go
@@ -1149,7 +1149,7 @@ func (w errorWriterToTest) Write(p []byte) (int, error) {
var errorWriterToTests = []errorWriterToTest{
{1, 0, nil, io.ErrClosedPipe, io.ErrClosedPipe},
{0, 1, io.ErrClosedPipe, nil, io.ErrClosedPipe},
- {0, 0, io.ErrUnexpectedEOF, io.ErrClosedPipe, io.ErrClosedPipe},
+ {0, 0, io.ErrUnexpectedEOF, io.ErrClosedPipe, io.ErrUnexpectedEOF},
{0, 1, io.EOF, nil, nil},
}