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

     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.
     5  env 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.
    10  go tool -n foo
    11  stdout $GOCACHE
    12  
    13  # And of course we should also return the cached location on subsequent
    14  # runs.
    15  go tool -n foo
    16  stdout $GOCACHE
    17  
    18  -- go.mod --
    19  module example.com/foo
    20  
    21  go 1.25
    22  
    23  tool example.com/foo
    24  -- main.go --
    25  package main
    26  
    27  func main() {}

View as plain text