...

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

Documentation: cmd/go/testdata/script

     1env GO111MODULE=off
     2[short] skip
     3
     4# go clean -testcache
     5# should work (see golang.org/issue/29757).
     6cd x
     7go test x_test.go
     8go clean -testcache
     9go test x_test.go
    10! stdout 'cached'
    11! go clean -testcache ../x
    12stderr '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.
    18env GOCACHE=$WORK/nonexistent
    19go clean -testcache
    20! exists $WORK/nonexistent
    21
    22-- x/x_test.go --
    23package x_test
    24import (
    25    "testing"
    26)
    27func TestMain(t *testing.T) {
    28}

View as plain text