feat: better testing UX and some impros - #4
Merged
Merged
Conversation
norimel clips text runs at the buffer edge rather than wrapping them, so a single long Debug line in a failed test's captured stdout got cut mid-token. Hard-wrap each line to the terminal width (minus a right-hand padding margin) before handing it to the existing scroll/pagination logic.
…! diffs The failed-test stdout panel gave every line the same visual weight, so the one line that matters (the panic message) got lost in whatever the test printed before it. Tag the message line bold and, when libtest's own " left: "/" right: " pair follows it, color left red and right green, so the eye lands on the failure instead of scanning a wall of uniform text. Verified against real cargo test --format json output for an assert_eq! failure, not just synthetic strings.
stdout_scroll only got clamped at render time for display, so it kept
counting past the true max while held at the bottom, and Up needed the
same number of presses to unwind that overshoot before the view actually
moved. Write the clamped value back to state instead of just reading a
clamped local.
Also add Char('q') next to every existing Esc quit/dismiss arm, and
mention it in the two hint lines.
Fixing a failing test used to mean rerunning the whole suite to check it. `r` on the selected row now rebuilds quietly (no live progress, so the build/progress block above the accordion doesn't reanimate) and reruns just that test with --exact, trying each binary in turn since a rebuilt binary's hash-suffixed filename can change. While it runs the row shows a yellow triangle instead of its marker/time. On pass it drops out of the list and selection moves on; on failure it updates in place with the fresh location/stdout, still expanded. build() now takes tx as Option<&Emitter<Event>> so the quiet rebuild can reuse it without sending progress events, and returns the compiler's error text so a failed retry rebuild has something to show instead of nothing. Verified against a real two-binary scratch crate: a binary with no matching --exact test emits zero `test` events (confirming the try-next-binary logic) and the one that does have it reports the real failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.