aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/env_unset.txt
blob: 22bc845c37bf4ecc7cde8b989b1d899e7a01e522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Test that we can unset variables, even if initially invalid,
# as long as resulting config is valid.

env GOENV=badenv
env GOOS=
env GOARCH=
env GOEXPERIMENT=

! go env
stderr '^go(\.exe)?: unknown GOEXPERIMENT badexp$'

go env -u GOEXPERIMENT

! go env
stderr '^go: unsupported GOOS/GOARCH pair bados/badarch$'

! go env -u GOOS
stderr '^go: unsupported GOOS/GOARCH pair \w+/badarch$'

! go env -u GOARCH
stderr '^go: unsupported GOOS/GOARCH pair bados/\w+$'

go env -u GOOS GOARCH

go env

-- badenv --
GOOS=bados
GOARCH=badarch
GOEXPERIMENT=badexp