...

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

Documentation: cmd/go/testdata/script

     1# Test GOEXPERIMENT variable
     2
     3# go env shows default empty GOEXPERIMENT
     4go env
     5stdout GOEXPERIMENT=
     6
     7# go env shows valid experiments
     8env GOEXPERIMENT=fieldtrack,staticlockranking
     9go env GOEXPERIMENT
    10stdout '.*fieldtrack.*staticlockranking.*'
    11go env
    12stdout 'GOEXPERIMENT=.*fieldtrack.*staticlockranking.*'
    13
    14# go env rejects unknown experiments
    15env GOEXPERIMENT=bad
    16! go env GOEXPERIMENT
    17stderr 'unknown GOEXPERIMENT bad'

View as plain text