mirror of
https://github.com/golang/go.git
synced 2025-11-11 22:21:06 +00:00
testing: fix build
Dependency on bufio crept in during last CL; this breaks the cycle. Also add a missing '-' to the documentation. R=rsc CC=golang-dev https://golang.org/cl/4274061
This commit is contained in:
parent
afaa30694c
commit
d3c61fc214
2 changed files with 5 additions and 5 deletions
|
|
@ -42,7 +42,7 @@ The resulting binary, called (for amd64) 6.out, has several flags.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
6.out [-test.v] [-test.run pattern] [-test.bench pattern] \
|
6.out [-test.v] [-test.run pattern] [-test.bench pattern] \
|
||||||
[test.memprofile=prof.out] [-test.memprofilerate=1]
|
[-test.memprofile=prof.out] [-test.memprofilerate=1]
|
||||||
|
|
||||||
The -test.v flag causes the tests to be logged as they run. The
|
The -test.v flag causes the tests to be logged as they run. The
|
||||||
-test.run flag causes only those tests whose names match the regular
|
-test.run flag causes only those tests whose names match the regular
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package bufio
|
package bufio_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
. "bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
@ -502,9 +503,8 @@ func TestWriteString(t *testing.T) {
|
||||||
b.WriteString("7890") // easy after flush
|
b.WriteString("7890") // easy after flush
|
||||||
b.WriteString("abcdefghijklmnopqrstuvwxy") // hard
|
b.WriteString("abcdefghijklmnopqrstuvwxy") // hard
|
||||||
b.WriteString("z")
|
b.WriteString("z")
|
||||||
b.Flush()
|
if err := b.Flush(); err != nil {
|
||||||
if b.err != nil {
|
t.Error("WriteString", err)
|
||||||
t.Error("WriteString", b.err)
|
|
||||||
}
|
}
|
||||||
s := "01234567890abcdefghijklmnopqrstuvwxyz"
|
s := "01234567890abcdefghijklmnopqrstuvwxyz"
|
||||||
if string(buf.Bytes()) != s {
|
if string(buf.Bytes()) != s {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue