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

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

View as plain text