]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add test case for issue 64738
authorRuss Cox <rsc@golang.org>
Tue, 19 Dec 2023 14:42:00 +0000 (09:42 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 23 Jan 2024 18:08:32 +0000 (18:08 +0000)
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 <matloob@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/testdata/script/mod_run_flags_issue64738.txt [new file with mode: 0644]

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 (file)
index 0000000..f143b02
--- /dev/null
@@ -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