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

[nextest-runner] handle outputs with/without trailing newlines better #1921

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

sunshowers
Copy link
Member

Previously, our headers would always insert a leading newline to compensate for situations where the output didn't have a trailing newline in it. This isn't quite right (what if the last output doesn't have a newline in it)? It also causes issues with situations where RESET_COLOR needs to be inserted immediately before the last newline.

Change our code to always insert a trailing newline, and the trailer immediately before that.

Previously, our headers would always insert a leading newline to compensate for
situations where the output didn't have a trailing newline in it. This isn't
quite right (what if the last output doesn't have a newline in it)? It also
causes issues with situations where RESET_COLOR needs to be inserted
immediately before the last newline.

Change our code to always insert a trailing newline, and the trailer
immediately before that.
@sunshowers sunshowers merged commit 219360c into nextest-rs:main Nov 30, 2024
16 of 17 checks passed
@sunshowers sunshowers deleted the trailing-newlines branch November 30, 2024 01:23
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.

1 participant