Text file src/cmd/go/testdata/script/version_goexperiment.txt
1 # Test that experiments appear in "go version <binary>" 2 3 # This test requires rebuilding the runtime, which takes a while. 4 [short] skip 5 6 env GOEXPERIMENT=fieldtrack 7 go build -o main$GOEXE version.go 8 go version main$GOEXE 9 stdout 'X:fieldtrack$' 10 exec ./main$GOEXE 11 stderr 'X:fieldtrack$' 12 13 -- version.go -- 14 package main 15 import "runtime" 16 func main() { println(runtime.Version()) } 17