1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:30:02 -07:00

cmd/go: remove tests using testdata/flag_test.go

Part of converting all tests to script framework to improve
test parallelism.

Updates #36320
Updates #17751

Change-Id: I6573185cf14f298c51f76265f18a75e4960ce791
Reviewed-on: https://go-review.googlesource.com/c/go/+/213220
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Michael Matloob 2020-01-03 17:03:42 -05:00
parent bc91947527
commit cde230b8b3
3 changed files with 20 additions and 16 deletions

View File

@ -2602,14 +2602,6 @@ func TestGoTestMainTwice(t *testing.T) {
}
}
func TestGoTestFlagsAfterPackage(t *testing.T) {
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
tg.run("test", "testdata/flag_test.go", "-v", "-args", "-v=7") // Two distinct -v flags.
tg.run("test", "-v", "testdata/flag_test.go", "-args", "-v=7") // Two distinct -v flags.
}
func TestGoTestXtestonlyWorks(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
@ -4767,14 +4759,6 @@ func TestInstallDeps(t *testing.T) {
tg.mustExist(p1)
}
func TestGoTestMinusN(t *testing.T) {
// Intent here is to verify that 'go test -n' works without crashing.
// This reuses flag_test.go, but really any test would do.
tg := testgo(t)
defer tg.cleanup()
tg.run("test", "testdata/flag_test.go", "-n", "-args", "-v=7")
}
func TestGoTestJSON(t *testing.T) {
skipIfGccgo(t, "gccgo does not have standard packages")
tooSlow(t)

View File

@ -1,3 +1,9 @@
[short] skip
go test flag_test.go -v -args -v=7 # Two distinct -v flags
go test -v flag_test.go -args -v=7 # Two distinct -v flags
-- flag_test.go --
package flag_test
import (

View File

@ -0,0 +1,14 @@
# The intent here is to verify that 'go test -n' works without crashing.
# Any test will do.
go test -n x_test.go
-- x_test.go --
package x_test
import (
"testing"
)
func TestEmpty(t *testing.T) {
}