Commit a3f64237 authored by Alan Donovan's avatar Alan Donovan

cmd/vet: basic tests of go vet -json -c=N flags

Change-Id: I787592a5d92ff9329ecdfcf879e491af66c8b749
Reviewed-on: https://go-review.googlesource.com/c/149962
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: default avatarMichael Matloob <matloob@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b411c426
...@@ -5,6 +5,21 @@ env GOARCH=amd64 ...@@ -5,6 +5,21 @@ env GOARCH=amd64
! go vet -asmdecl a ! go vet -asmdecl a
stderr 'f: invalid MOVW of x' stderr 'f: invalid MOVW of x'
# -c flag shows context
! go vet -c=2 -asmdecl a
stderr '...invalid MOVW...'
stderr '1 .*TEXT'
stderr '2 MOVW'
stderr '3 RET'
stderr '4'
# -json causes success, even with diagnostics and errors.
go vet -json -asmdecl a
stderr '"a": {'
stderr '"asmdecl":'
stderr '"posn": ".*asm.s:2:1",'
stderr '"message": ".*invalid MOVW.*"'
-- a/a.go -- -- a/a.go --
package a package a
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment