From e1dc707f33b0cecae32e6e649fbd58a7274fc322 Mon Sep 17 00:00:00 2001 From: Brian Gabin Date: Sun, 20 Oct 2024 21:58:08 -0700 Subject: [PATCH] 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 --- src/cmd/go/testdata/script/mod_install_versioned.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- -- 2.48.1