Skip to content

test: add \\r carriage return expansion tests for parse#978

Closed
mahmoodhamdi wants to merge 1 commit intomotdotla:masterfrom
mahmoodhamdi:test/parse-carriage-return-expansion
Closed

test: add \\r carriage return expansion tests for parse#978
mahmoodhamdi wants to merge 1 commit intomotdotla:masterfrom
mahmoodhamdi:test/parse-carriage-return-expansion

Conversation

@mahmoodhamdi
Copy link
Copy Markdown
Contributor

Summary

  • Add test verifying \r is expanded to carriage return in double-quoted values
  • Add test verifying \r is NOT expanded in unquoted values
  • Add test verifying \r is NOT expanded in single-quoted values

The parser expands both \n and \r in double-quoted values (lines 76-77 of main.js), but only \n expansion had test coverage.

Test plan

  • npm test passes (197 tests)
  • No new dependencies

Add tests verifying that \\r is expanded to actual carriage return
only in double-quoted values, matching the existing \\n expansion
behavior.
@mahmoodhamdi
Copy link
Copy Markdown
Contributor Author

Closing this — I should have consolidated these into a single well-structured PR instead of opening them individually. Apologies for the noise.

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