Skip to content
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

Ensure that assert.Fail properly align its output #364

Merged
merged 1 commit into from
Dec 17, 2016

Conversation

nmiyake
Copy link
Contributor

@nmiyake nmiyake commented Oct 29, 2016

Previous implementation depended on tab alignment. This worked
when the output was not prepended with anything, but would break
if the output was prepended with further spaces (which can occur
in environments like IntelliJ test runners). This commit fixes it
so that the output is always aligned logically.

Fixes #83

Previous implementation depended on tab alignment. This worked
when the output was not prepended with anything, but would break
if the output was prepended with further spaces (which can occur
in environments like IntelliJ test runners). This commit fixes it
so that the output is always aligned logically.

Fixes stretchr#83
@nmiyake
Copy link
Contributor Author

nmiyake commented Oct 29, 2016

Example output before -- first output is running in IntelliJ, second directly in terminal:

image

Example output after -- first output is running in IntelliJ, second directly in terminal:

image

@nmiyake
Copy link
Contributor Author

nmiyake commented Oct 31, 2016

Note that this PR also makes it such that the "Messages" output is aligned, which is a behavior change. I believe this behavior is more conceptually correct and looks nicer, but that can be done as a separate discussion/PR if there's contention around that (whereas making sure the alignment is consistent between terminal and runner output is indisputably a bug that should be fixed).

@ernesto-jimenez (or any other project maintainers), please let me know if you have any feedback.

@nmiyake
Copy link
Contributor Author

nmiyake commented Nov 20, 2016

@ernesto-jimenez any feedback? This PR is getting fairly stale and would like to know whether it can move forward (or if it needs to be modified).

@ernesto-jimenez
Copy link
Member

@nmiyake finally had some time to review it.

Looks good, merging it now :)

@ernesto-jimenez ernesto-jimenez merged commit 2402e8e into stretchr:master Dec 17, 2016
jonnyreeves pushed a commit to jonnyreeves/testify that referenced this pull request Jan 5, 2017
Ensure that assert.Fail properly align its output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multilines don't play nicely with vim-go
2 participants