summaryrefslogtreecommitdiff
path: root/tests/micropython/test_normalize_newlines.py
AgeCommit message (Collapse)Author
2 daystests/run-tests.py: Add general newline normalization function.Andrew Leech
Add a general normalize_newlines() function that handles newline variations (\\r\\r\\n, \\r\\n) to \\n while preserving literal \\r characters that are part of test content. This provides a robust solution for cross-platform test compatibility, particularly addressing PTY double-newline issues that can occur with some terminal implementations. The function is applied to all test output before comparison, eliminating platform-specific newline issues. Includes a unit test to verify the normalization behavior. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>