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

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

View as plain text