From: Russ Cox Date: Tue, 19 Dec 2023 14:42:00 +0000 (-0500) Subject: cmd/go: add test case for issue 64738 X-Git-Tag: go1.23rc1~1403 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=76b8bec6dbea9d56edbb5b2e8ab2fcf100ac1cd0;p=gostls13.git cmd/go: add test case for issue 64738 The straight revert in CL 551215 fixed this issue. Add a test case to make sure we don't reintroduce it. Test case copied from CL 550237 (by bcmills). Fixes #64738. Change-Id: I9654a1fd46fe1a1cc63ee6645a552ec21d720ad0 Reviewed-on: https://go-review.googlesource.com/c/go/+/551255 Reviewed-by: Michael Matloob Auto-Submit: Russ Cox Reviewed-by: Mauri de Souza Meneguzzo LUCI-TryBot-Result: Go LUCI Reviewed-by: Daniel Martí Reviewed-by: Bryan Mills --- diff --git a/src/cmd/go/testdata/script/mod_run_flags_issue64738.txt b/src/cmd/go/testdata/script/mod_run_flags_issue64738.txt new file mode 100644 index 0000000000..f143b026fe --- /dev/null +++ b/src/cmd/go/testdata/script/mod_run_flags_issue64738.txt @@ -0,0 +1,4 @@ +# Regression test for https://go.dev/issue/64738: +# a bug in 'go run' caused flags arguments after the requested package to +# also be parsed as cmd/go flags. +go run -n example.com/printversion@v0.1.0 -p ignored