-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
testing: test output indentation looks inconsistent when tab width != 4 #25369
Comments
Indeed, there is a mix of tabs and 4 spaces indentations in testing package. I am not sure what was the purpose of tabs in indentation of every line since we have 4 spaces here: https://github.com/golang/go/blob/master/src/testing/testing.go#L429 A quick fix comes to mind:
But it implies fixing tests as well. |
Change https://golang.org/cl/113177 mentions this issue: |
I think it’s fine. If someone is relying on the textual output of tests instead of using the JSON output, then this will be a good reason for them to switch :) |
What did you do?
Run the following program:
https://play.golang.org/p/IAMobZmXMqw
What did you expect to see?
This is what you see if tabs are 4 spaces wide. Note that each subtest's output is indented with 4 leading spaces, and each log message has a tab after those.
What did you see instead?
This is what you see if tabs are 8 spaces wide; any tab width other than 4 will cause similar inconsistencies.
System details
The text was updated successfully, but these errors were encountered: