1
0
mirror of https://github.com/golang/go synced 2024-11-17 03:14:50 -07:00

cmd/link: fix TestStrictDup in module mode

Fixes #35790

Change-Id: Ie9df103c5c21b34a378821dfad60804ce4b0cad4
Reviewed-on: https://go-review.googlesource.com/c/go/+/208517
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Fazlul Shahriar 2019-11-23 00:31:39 -05:00 committed by Bryan C. Mills
parent 7adafc985a
commit 5de3b97554

View File

@ -420,6 +420,11 @@ func TestStrictDup(t *testing.T) {
if err != nil {
t.Fatal(err)
}
src = filepath.Join(tmpdir, "go.mod")
err = ioutil.WriteFile(src, []byte("module teststrictdup\n"), 0666)
if err != nil {
t.Fatal(err)
}
cmd := exec.Command(testenv.GoToolPath(t), "build", "-ldflags=-strictdups=1")
cmd.Dir = tmpdir