...

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

Documentation: cmd/go/testdata/script

     1[short] skip 'does a build in using an empty cache'
     2
     3# Start with a fresh cache because we want to verify the behavior
     4# when the tool hasn't been cached previously.
     5env GOCACHE=$WORK${/}cache
     6
     7# Even when the tool hasn't been previously cached but was built and
     8# saved to the cache in the invocation of 'go tool -n' we should return
     9# its cached location.
    10go tool -n foo
    11stdout $GOCACHE
    12
    13# And of course we should also return the cached location on subsequent
    14# runs.
    15go tool -n foo
    16stdout $GOCACHE
    17
    18-- go.mod --
    19module example.com/foo
    20
    21go 1.25
    22
    23tool example.com/foo
    24-- main.go --
    25package main
    26
    27func main() {}

View as plain text