mirror of
https://github.com/micropython/micropython.git
synced 2026-03-11 19:30:28 +01:00
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>
9 lines
83 B
Plaintext
9 lines
83 B
Plaintext
Testing newline handling
|
|
Line 1
|
|
Line 2
|
|
Line 3
|
|
Line 4
|
|
Line 5
|
|
Line 6
|
|
'test\rstring'
|