Skip to content

Fix Windows CI failure: normalize line endings in getResponse() - #11

Merged
jingyucodes merged 1 commit into
masterfrom
fix-windows-line-ending-mismatch
Sep 17, 2026
Merged

jingyucodes merged 1 commit into
masterfrom
fix-windows-line-ending-mismatch

Conversation

@jingyucodes

Copy link
Copy Markdown
Owner

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.

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.
@jingyucodes
jingyucodes merged commit 59960ef into master Sep 17, 2026
6 checks passed
@jingyucodes
jingyucodes deleted the fix-windows-line-ending-mismatch branch September 17, 2026 15:54
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