...
1env GO111MODULE=off
2[short] skip
3
4# 'go install' with no arguments should clean up after go build
5cd mycmd
6go build
7exists mycmd$GOEXE
8go install
9! exists mycmd$GOEXE
10
11# 'go install mycmd' does not clean up, even in the mycmd directory
12go build
13exists mycmd$GOEXE
14go install mycmd
15exists mycmd$GOEXE
16
17# 'go install mycmd' should not clean up in an unrelated current directory either
18cd ..
19cp mycmd/mycmd$GOEXE mycmd$GOEXE
20go install mycmd
21exists mycmd$GOEXE
22
23-- mycmd/main.go --
24package main
25func main() {}
View as plain text