aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/version_goexperiment.txt
blob: 4b165eb6055447fe01a54b9e24c5c4c00fd24052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Test that experiments appear in "go version <binary>"

# This test requires rebuilding the runtime, which takes a while.
[short] skip

env GOEXPERIMENT=fieldtrack
go build -o main$GOEXE version.go
go version main$GOEXE
stdout 'X:fieldtrack$'
exec ./main$GOEXE
stderr 'X:fieldtrack$'

-- version.go --
package main
import "runtime"
func main() { println(runtime.Version()) }