-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
Definitely - flushing is required, that's the only mode in which the tabwriter is expected to operate (see bottom of docs). The problem, I suspect, is that the underlying Seems like we should have some kind of basic test for this, at least for e.g. the JSON output...? Like, if we had had a test to check that the marshaled JSON output was actually valid JSON, would that have caught this problem in #525? |
Yeah, tests on the outputs of |
Can we add a quick test, at least for the JSON output, with a note that it's a regression test for this problem? With dot or the tabwriter output it's harder to verify, but with JSON at least we can verify that our |
Added a test to verify table format output, by extending the integration tests to optionally verify stdout. This lays a foundation to trivially drop in json, dot formats, or any other commands with deterministic output, but I started minimal for now. Let me know if I should just clone this status test and tweak it to cover json and dot as well, or if we should go in another direction. |
hah, no, this seems great - more than i was hoping for! 👍 to replicating for dot and JSON output |
quick rebase and this is good to go |
in we go - thanks! |
This is a simple fix for the regression #532 introduced in #525.
@sdboyer Is this sufficient, even if only as a temporary fix? Or is incremental output desired/
necessary?Edit: Not necessary, since tabwriter might not flush until explicitly told to at the end.