From: Brian Gabin Date: Mon, 21 Oct 2024 04:58:08 +0000 (-0700) Subject: cmd/go/testdata/script: restrict test to check only exe name X-Git-Tag: go1.24rc1~186 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e1dc707f33b0cecae32e6e649fbd58a7274fc322;p=gostls13.git cmd/go/testdata/script: restrict test to check only exe name Avoid test failures caused by 'v2' in user environment paths. Modify the test to check only the output executable name and ensure it is not 'v2', rather than inspecting the entire path. Fixes #67989 Change-Id: Ida2131f6c9b41724df1b6b5e31413252c5009d25 Reviewed-on: https://go-review.googlesource.com/c/go/+/621315 LUCI-TryBot-Result: Go LUCI Auto-Submit: Sam Thanawalla Reviewed-by: Michael Matloob Reviewed-by: Cherry Mui Reviewed-by: Sam Thanawalla --- diff --git a/src/cmd/go/testdata/script/mod_install_versioned.txt b/src/cmd/go/testdata/script/mod_install_versioned.txt index 627a9a81b0..51b78968e9 100644 --- a/src/cmd/go/testdata/script/mod_install_versioned.txt +++ b/src/cmd/go/testdata/script/mod_install_versioned.txt @@ -7,7 +7,7 @@ stdout 'fortune(\.exe)?$' go get rsc.io/fortune/v2 go list -f '{{.Target}}' rsc.io/fortune/v2 -! stdout v2 +! stdout 'v2(\.exe)?$' stdout 'fortune(\.exe)?$' -- go.mod --