|
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>
|