Repository navigation
test(#731): CRLF scripts are a two-layer contract - windows #140 tolerance, unix GNU parity - #801
Merged
Conversation
…rance, unix GNU parity The two issue106 CRLF tests encoded ONE behavior for both platforms and contradicted whichever platform ran the other contract: on windows the #140 product tolerance (trailing '\r' stripped before lexing/heredoc bodies - the shipped oh-my-niu bundle is 100% CRLF) makes them green, while the unix lane's GNU-faithful reader makes them red - and the #731 body's premise ('rubash matches GNU byte-for-byte today') only held for the unix build. Ruling recorded on #731: each platform pins its OWN shipped contract. windows asserts the tolerant bytes (rc 0, compound-ok, clean heredoc); unix asserts the GNU bytes (WSL 5.3.0 verified: rc 2 + 'syntax error near unexpected end of file from `if' command', empty stdout; heredoc body and trailing words keep the '\r'). A strict-parity opt-in on windows remains a future enhancement, never a default flip.
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.
Closes #731 (the decision, implemented).
The two issue106 CRLF tests encoded one behavior for both platforms; each platform ships a different contract (windows: #140 tolerance, cfg-gated, because the shipped bundle is 100% CRLF; unix: byte-exact GNU). The tests now pin each platform's own contract via a cfg! branch, with the WSL-verified GNU bytes (rc 2 + syntax error; heredoc keeps '\r') recorded in the file and on #731. The issue's premise that rubash 'matches GNU byte-for-byte today' only described the unix build.