cmd/link: fix TestLargeText

Do not need to add single quotes '' when passing the parameter value of
 the -ldflags option, otherwise the following error will be reported:
invalid value "'-linkmode=external'" for flag -ldflags: parameter may
not start with quote character.

Change-Id: I322fa7079ac24c8a68d9cb0872b0a20dbc4893d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/410074
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
This commit is contained in:
eric fang 2022-06-02 06:54:50 +00:00 committed by Eric Fang
parent 74dc84a0e5
commit 7846e25418

View file

@ -97,7 +97,7 @@ func TestLargeText(t *testing.T) {
}
// Build and run with external linking
cmd = exec.Command(testenv.GoToolPath(t), "build", "-o", "bigtext", "-ldflags", "'-linkmode=external'")
cmd = exec.Command(testenv.GoToolPath(t), "build", "-o", "bigtext", "-ldflags", "-linkmode=external")
cmd.Dir = tmpdir
out, err = cmd.CombinedOutput()
if err != nil {