Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
testing: test output indentation looks inconsistent when tab width != 4 #25369
What did you do?
Run the following program:
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.
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.