$ go version
1.21.4

In the documentation of test package, it is said

Tests that open files within the package's source root (usually $GOPATH) or that consult environment variables only match future runs in which the files and environment variables are unchanged.

However, is "the package's source root" really usually $GOPATH (e.g. ~/go)?

Comment From: mknyszek

AFAICT this is internal documentation, so it's not really intended to be user-facing. I think this question is more appropriate for the golang-dev mailing list.

That being said, I'm not sure what the right thing here is. CC @bcmills

Closing this issue for now. Thanks for flagging this.

Comment From: bcmills

I think this issue is about the string displayed by go help test, not the package doc comment.

Comment From: bcmills

@your-diary, these days the package's source root is usually the module that contains it. (The comment is out of date.)

Comment From: gopherbot

Change https://go.dev/cl/598235 mentions this issue: cmd/go/internal/test: update documentation for the "go test" command