`go test -v` stops working
wyc opened this issue · 4 comments
wyc commented
Hi, when I use your library instead of the default flag
, I encounter this error when I try to run tests in verbose mode:
$ go test -v
flag provided but not defined: -test.v
Any quick fix for this?
wyc commented
Okay, as a hack to make it work, I added this to my global vars:
var chatty = flag.Bool("test.v", false, "verbose: print additional output")
Taken from here: https://golang.org/src/testing/testing.go#L232
Now using only your package, this particular flag seems to work. Of course this isn't ideal as the others are still broken, but I guess I'll keep adding them to my project as needed until we get a fix here. E.g., go test -trace my.trace
isn't working.
wyc commented
I see this issue describing the same thing: #9
Here are steps to reproduce:
- Download this gist into its own directory: https://gist.github.com/wyc/b6d7dae829e613e5260e4310061161de
- Run
go test -v
The result should be something like this:
$ go test -v
flag provided but not defined: -test.v
Usage of /tmp/go-build338776245/_/tmp/repro/_test/repro.test:
exit status 2
FAIL _/tmp/repro 0.001s