]> Cypherpunks repositories - gostls13.git/commit
cmd/go/testdata/script: fix TestScript/env_gocacheprog on Windows
authorMichael Matloob <matloob@golang.org>
Wed, 8 Jan 2025 16:19:05 +0000 (11:19 -0500)
committerMichael Matloob <matloob@golang.org>
Wed, 8 Jan 2025 18:11:09 +0000 (10:11 -0800)
commit9a44df66758c65e6f0b3ab0002a297d2fc266d7c
tree33d0e3674dfc05b674f19372554590c934a049de
parentf025d19e7b3f0c66242760c213cc2b54cb100f69
cmd/go/testdata/script: fix TestScript/env_gocacheprog on Windows

The backslashes on the windows paths will be escaped, so when checking
for them in the regular expression we'd have to have quadruple
backslashes '\\\\'. Since it's difficult to escape $GOCACHEPROG properly
for both json and regexp, just check for a string that ends in
cacheprog$GOEXE. We already check that the proper value is reported in
go env and go env -changed, and the json test case is mostly useful to
verify that GOCACHEPROG shows up in the json output.

For #71059

Change-Id: I52d49de61f2309a139f84c4d232b4cd94546ec8c
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-longtest,gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/641375
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/go/testdata/script/env_gocacheprog.txt