Fix Windows CI failure: normalize line endings in getResponse() - #11
Merged
Merged
Conversation
Echo#getResponse() captured System.out's raw bytes and returned
them as-is. On Windows, println() emits "\r\n", but EchoTest's
expected strings use Java string literals ("\n" only), so every
multi-line EchoTest assertion failed on windows-latest CI while
passing on ubuntu-latest/macos-latest, even though the visible text
looked identical in the failure output.
Replace the host line separator with "\n" before returning, so the
result is deterministic regardless of platform. This is also the
more correct behavior for a GUI dialog string, which should not
contain a raw "\r" regardless of what OS Echo happens to run on.
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.
Fixes the windows-latest CI failures seen on PR #9 and PR #10
(9 EchoTest assertions failing due to \r\n vs \n mismatch).
The ubuntu-latest failure on PR #10 was unrelated: it was cancelled
because windows-latest failed in the same matrix, compounded by a
transient 429 from GitHub's action cache. No code fix needed for that.
See commit message for root cause and fix details.