package out_test
import (
"fmt"
"testing"
)
func TestOut(t *testing.T) { fmt.Print("TestOut") }
$ go test .
ok testout 0.016s
$ go test . -v
=== RUN TestOut
Test--- PASS: TestOut (0.00s)
PASS
ok testout 0.017s
Output to stdout during tests is captured and printed along with t.Logf et al. output when -v is supplied. If the output doesn't end with a newline, the output is as above.
We have some tools that parse test output which get confused in this situation. It's easy enough to avoid (just print a newline in your test) but it would also be pretty trivial for the testing package could add a newline when one is missing.