From 7846e25418a087ca15122b88fc179405e26bf768 Mon Sep 17 00:00:00 2001 From: eric fang Date: Thu, 2 Jun 2022 06:54:50 +0000 Subject: [PATCH] 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 TryBot-Result: Gopher Robot Reviewed-by: Benny Siegert Run-TryBot: Eric Fang --- src/cmd/link/linkbig_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/link/linkbig_test.go b/src/cmd/link/linkbig_test.go index 9a4430c162..2551afc8cb 100644 --- a/src/cmd/link/linkbig_test.go +++ b/src/cmd/link/linkbig_test.go @@ -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 { -- 2.50.0