main_test.go: fork testdata/testing.go for go 1.18

This commit is contained in:
Dan Kegel
2022-03-19 19:56:43 -07:00
committed by Ron Evans
parent 0dd521e1d1
commit 0f9f316db2
3 changed files with 126 additions and 1 deletions
+5 -1
View File
@@ -66,7 +66,6 @@ func TestBuild(t *testing.T) {
"stdlib.go",
"string.go",
"structs.go",
"testing.go",
"zeroalloc.go",
}
_, minor, err := goenv.GetGorootVersion(goenv.Get("GOROOT"))
@@ -76,6 +75,11 @@ func TestBuild(t *testing.T) {
if minor >= 17 {
tests = append(tests, "go1.17.go")
}
if minor >= 18 {
tests = append(tests, "testing_go118.go")
} else {
tests = append(tests, "testing.go")
}
if *testTarget != "" {
// This makes it possible to run one specific test (instead of all),