Conversation
epage
left a comment
There was a problem hiding this comment.
Good idea! I've not run into non-utf8 or large buffers, so this hasn't been a problem for me :)
src/output.rs
Outdated
| write!(f, "{}", buffer) | ||
| } else { | ||
| write!(f, "{:?}", buffer) | ||
| write_bytes(buffer, f) |
There was a problem hiding this comment.
I think we should update dump_buffer to match
(ideally one would be implemented in terms of the other)
There was a problem hiding this comment.
Added in the new push. Although, I've replaced it with DebugBytes everywhere, maybe should have been changed the function to return DebugBytes instead.
5e69026 to
2bc008f
Compare
1. Even if stdout is not fully utf-8, we print all ASCII printable characters verbatim and hex-escapes `\xAB` for non-printable (this is actually done by bstr library) 2. For inputs larger than 8KiB we only print first and last 2KiB and omit bytes in the middle. This helps reading error messages on larger stdin data
the latter has nicer representation
2bc008f to
330f0e3
Compare
|
Finally got my hands on this. Probably fixed all the feedback. |
|
Sorry for being slow in responding and thanks for doing this! I'm working through my crates, doing updates. I can rush out a release of this or wait until I can include my other updates. let me know what your timeline is for this. |
|
I'm fine using git version for now. Would appreciate if you ping me once it's released. |
|
Just released a new version! |
Better debug print of stdin
characters verbatim and hex-escapes
\xABfor non-printableomit bytes in the middle.
This helps reading error messages on larger stdin data (in my use case assert_cmd dumped ~440Mb of data on the terminal).