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

     1  env GO111MODULE=off
     2  [short] skip
     3  
     4  # go clean -testcache
     5  # should work (see golang.org/issue/29757).
     6  cd x
     7  go test x_test.go
     8  go clean -testcache
     9  go test x_test.go
    10  ! stdout 'cached'
    11  ! go clean -testcache ../x
    12  stderr 'go: clean -testcache cannot be used with package arguments'
    13  
    14  # golang.org/issue/29100: 'go clean -testcache' should succeed
    15  # if the cache directory doesn't exist at all.
    16  # It should not write a testexpire.txt file, since there are no
    17  # test results that need to be invalidated in the first place.
    18  env GOCACHE=$WORK/nonexistent
    19  go clean -testcache
    20  ! exists $WORK/nonexistent
    21  
    22  -- x/x_test.go --
    23  package x_test
    24  import (
    25      "testing"
    26  )
    27  func TestMain(t *testing.T) {
    28  }
    29  

View as plain text