internal/versions: disable a test case incompatible with CL 607955

CL 607955 is changing the behavior of "//go:build" file versions.
Before, file versions did not apply if go version was set for the
package, but after CL 6079055, the package's go version does not
influence whether the file version is applied: max(fileVersion, go1.21)
will always be applied.

Once CL 607955 is released in a go 1.23 minor release, we can update the
test to require go1.23 and test for the new behavior (though it would
fail for users building with a version of go older than the minor
release with the behavior update).

For golang/go#68658

Change-Id: I99d39ce108274edf401d861e553ad923b508f936
Reviewed-on: https://go-review.googlesource.com/c/tools/+/608797
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Michael Matloob 2024-08-27 16:37:52 -04:00
Родитель 0734f6249f
Коммит adb7301a7f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -38,7 +38,7 @@ func Test(t *testing.T) {
pversion string
tests []fileTest
}{
{"", "", []fileTest{{"noversion.go", ""}, {"gobuild.go", ""}}},
// {"", "", []fileTest{{"noversion.go", ""}, {"gobuild.go", ""}}}, // TODO(matloob): re-enable this test (with modifications) once CL 607955 has been submitted
{"go1.22", "go1.22", []fileTest{{"noversion.go", "go1.22"}, {"gobuild.go", "go1.23"}}},
} {
name := fmt.Sprintf("types.Config{GoVersion:%q}", item.goversion)