# Package with external tests
! go vet m/vetpkg
stderr 'Printf'

# With tags
! go vet -tags tagtest m/vetpkg
stderr 'c\.go.*Printf'

# With flags on
! go vet -printf m/vetpkg
stderr 'Printf'

# With flags off
go vet -printf=false m/vetpkg
! stderr .

# With only test files (tests issue #23395)
go vet m/onlytest
! stderr .

# With only cgo files (tests issue #24193)
[!cgo] skip
[short] skip
go vet m/onlycgo
! stderr .

-- go.mod --
module m

go 1.16
-- vetpkg/a_test.go --
package p_test
-- vetpkg/b.go --
package p

import "fmt"

func f() {
	fmt.Printf("%d")
}
-- vetpkg/c.go --
// +build tagtest

package p

import "fmt"

func g() {
	fmt.Printf("%d", 3, 4)
}
-- onlytest/p_test.go --
package p

import "testing"

func TestMe(*testing.T) {}
-- onlycgo/p.go --
package p

import "C"

func F() {}
