-
Notifications
You must be signed in to change notification settings - Fork 125
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
[v0.4.2] incorrect test output when stdout is missing a newline #105
Comments
Thank you for the bug report! Which version of Go are you using? This sounds like it may be the same issue as #101 which is a bug in the The changes in behaviour in gotestsum 0.4.2 are to work around a new bug in Go 1.14.x. I'm not sure what can be done about this, but I will try and reproduce. |
Thanks for the quick response! I'm running 1.14.1. |
Thanks again for the bug report. This appears to be an issue with In previous versions of Thankfully the exit code is always still correct. If the test run has not failed, the exit code will be 0, even though the output claims there is a failure. My impression is that the current behaviour is still an improvement. Showing some output incorrectly feels less bad than hiding failure output. I think one thing we can do to improve it is change the |
I've added a commit to #106 which makes that change (panic -> unknown) |
Thanks, @dnephin - given the root issue, I'm fine if you'd like to close this one out. I appreciate the help! |
It sounds like https://go-review.googlesource.com/c/go/+/443596 should finally have fixed this in the stdlib, and that fix should be in Go 1.20, so I'll close this issue now. |
Beginning with 0.4.2, output to stdout can cause gotestsum to report failure, noting (panic). In earlier versions, gotestsum absorbed the stdout and reported success/failure accurately.
Testcase:
Note that if the output is changed to include a new line, the problem does not surface.
Execution:
The text was updated successfully, but these errors were encountered: