cmd/go: add test checking version with experiment is valid

For #75953

Change-Id: I6a6a69645d6d2af9be1b076f2460cdb295ea3c6e
Reviewed-on: https://go-review.googlesource.com/c/go/+/720600
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
matloob@golang.org 2025-11-14 13:10:00 -05:00 committed by Michael Matloob
parent f22d37d574
commit c5c05a0e43

View file

@ -12,5 +12,13 @@ stderr 'X:fieldtrack$'
-- version.go --
package main
import "runtime"
func main() { println(runtime.Version()) }
import (
"go/version"
"runtime"
)
func main() {
if !version.IsValid(runtime.Version()) {
panic("version not valid: "+runtime.Version())
}
println(runtime.Version())
}