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

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

View as plain text