...

Text file src/cmd/go/testdata/script/version_goexperiment.txt

Documentation: cmd/go/testdata/script

     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
     6env GOEXPERIMENT=fieldtrack
     7go build -o main$GOEXE version.go
     8go version main$GOEXE
     9stdout 'X:fieldtrack$'
    10exec ./main$GOEXE
    11stderr 'X:fieldtrack$'
    12
    13-- version.go --
    14package main
    15import "runtime"
    16func main() { println(runtime.Version()) }

View as plain text