mirror of https://github.com/go-python/gopy.git
gopy: add go vet test
This commit is contained in:
parent
98d59f0c89
commit
b2daa0909e
11
main_test.go
11
main_test.go
|
@ -15,6 +15,17 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func TestGovet(t *testing.T) {
|
||||
cmd := exec.Command("go", "vet", "./...")
|
||||
buf := new(bytes.Buffer)
|
||||
cmd.Stdout = buf
|
||||
cmd.Stderr = buf
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
t.Fatalf("error running %s:\n%s\n%v", "go vet", string(buf.Bytes()), err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGofmt(t *testing.T) {
|
||||
exe, err := exec.LookPath("goimports")
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue