Closed hajimehoshi closed 6 years ago
Note that this is a regression: Go 1.11 beta 2 worked well with this case.
@gopherbot, please add label modules
Here is a trivial example to reproduce:
go mod init foo
cat > a_test.go <<EOT
package foo_test
import "testing"
func TestA(t *testing.T) {}
EOT
mkdir a
cp a_test.go a
go1.11beta2 tests fine in both directories, but go1.11beta3 now fails in the module root with an external test package:
$ ~/go1.11beta2/bin/go test foo foo/a
ok foo 0.001s
ok foo/a 0.001s
$ ~/go1.11beta3/bin/go test foo
build foo_test: cannot find module for path foo_test
$ ~/go1.11beta3/bin/go test foo/a
ok foo/a 0.001s
Bisect shows it breaks at b294fe9b0a9a0b9032cb2ecf9924e4c90f8de0ac which was submitted to fix #23970
@bcmills
Looks like this is the same bug as #26722
Closing as duplicate.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (Go 1.11 Beta 3)
What operating system and processor architecture are you using (
go env
)?What did you do?
Note that Ebiten package has two package names:
ebiten
andebiten_test
.What did you expect to see?
Test succeeds.
What did you see instead?
Test fails with an error message: