-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bufio: can't TestReaderSize #45373
Comments
I found out that if I run all.bash and build, then run the test with that newly built version the test passes, but for some reason running the test with the installed version it fails. They're the same versions, both 1.16.3. So I get different results depending on what directory the go command is in when I run the test. |
Exported things in *_test.go files are only visible for the test package in the same directory. When using old Go for running new Go's bufio_test, new one can't refer exported things in old Go's bufio/export_test.go file, because the import statement I think there is no bug here. |
OK thanks. Where is the package import search order specified? |
There is no package import search order as such, because the package paths mentioned in import statements are unique (https://golang.org/cmd/go/#hdr-Package_lists_and_patterns). All code in *_test.go files can only be seen when running Closing the issue because this is working as intended. |
Thanks @ianlancetaylor. That page states: If no import paths are given, the action applies to the package in the current directory. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I Cloned the repo. checked out release-branch.go1.16. cd'd to src/bufio and tried to run: go test -run TestReaderSize
What did you expect to see?
test passed
What did you see instead?
The text was updated successfully, but these errors were encountered: