summaryrefslogtreecommitdiff
path: root/src/pkg/bufio/bufio_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/bufio/bufio_test.go')
-rw-r--r--src/pkg/bufio/bufio_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pkg/bufio/bufio_test.go b/src/pkg/bufio/bufio_test.go
index 123adac29..5709213c8 100644
--- a/src/pkg/bufio/bufio_test.go
+++ b/src/pkg/bufio/bufio_test.go
@@ -53,11 +53,12 @@ func readBytes(buf *Reader) string {
if e == os.EOF {
break
}
- if e != nil {
+ if e == nil {
+ b[nb] = c
+ nb++
+ } else if e != iotest.ErrTimeout {
panic("Data: " + e.String())
}
- b[nb] = c
- nb++
}
return string(b[0:nb])
}
@@ -86,6 +87,7 @@ var readMakers = []readMaker{
{"byte", iotest.OneByteReader},
{"half", iotest.HalfReader},
{"data+err", iotest.DataErrReader},
+ {"timeout", iotest.TimeoutReader},
}
// Call ReadString (which ends up calling everything else)
@@ -97,7 +99,7 @@ func readLines(b *Reader) string {
if e == os.EOF {
break
}
- if e != nil {
+ if e != nil && e != iotest.ErrTimeout {
panic("GetLines: " + e.String())
}
s += s1