tg.grepStderrNot("duplicate loads of", "did not remove old packages from cache")
}
-// Issue 17119 more duplicate load errors
-func TestIssue17119(t *testing.T) {
- testenv.MustHaveExternalNetwork(t)
-
- tg := testgo(t)
- defer tg.cleanup()
- tg.parallel()
- tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
- tg.runFail("build", "dupload")
- tg.grepBothNot("duplicate load|internal error", "internal error")
-}
-
func TestBinaryOnlyPackages(t *testing.T) {
tooSlow(t)
--- /dev/null
+[!net] skip
+
+# Issue 17119: Test more duplicate load errors.
+! go build dupload
+! stderr 'duplicate load|internal error'
+stderr 'dupload/vendor/p must be imported as p'
+
+-- dupload/dupload.go --
+package main
+
+import (
+ _ "dupload/p2"
+ _ "p"
+)
+
+func main() {}
+-- dupload/p/p.go --
+package p
+-- dupload/p2/p2.go --
+package p2
+
+import _ "dupload/vendor/p"
+-- dupload/vendor/p/p.go --
+package p