...
1# Test go commands with no module.
2env GO111MODULE=on
3
4# go mod edit fails unless given explicit mod file argument
5! go mod edit -json
6go mod edit -json x.mod
7
8# bug succeeds
9[exec:echo] env BROWSER=echo
10[exec:echo] go bug
11
12# commands that load the package in the current directory fail
13! go build
14! go fmt
15! go generate
16! go get
17! go install
18! go list
19! go run
20! go test
21! go vet
22
23# clean succeeds, even with -modcache
24go clean -modcache
25
26# doc succeeds for standard library
27go doc unsafe
28
29# env succeeds
30go env
31
32# tool succeeds
33go tool -n test2json
34
35# version succeeds
36go version
37
38-- x.mod --
39module m
40
41-- x.go --
42package main
43func main() {}
View as plain text