summaryrefslogtreecommitdiff
path: root/tests/micropython
diff options
context:
space:
mode:
Diffstat (limited to 'tests/micropython')
-rw-r--r--tests/micropython/test_normalize_newlines.py14
-rw-r--r--tests/micropython/test_normalize_newlines.py.exp8
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/micropython/test_normalize_newlines.py b/tests/micropython/test_normalize_newlines.py
new file mode 100644
index 000000000..f19aaa69a
--- /dev/null
+++ b/tests/micropython/test_normalize_newlines.py
@@ -0,0 +1,14 @@
+# Test for normalize_newlines functionality
+# This test verifies that test framework handles various newline combinations correctly
+
+# Note: This is more of an integration test since normalize_newlines is in the test framework
+# The actual testing happens when this test is run through run-tests.py
+
+print("Testing newline handling")
+print("Line 1\r\nLine 2") # Windows-style line ending - should be normalized
+print("Line 3") # Normal line
+print("Line 4") # Normal line
+print("Line 5\nLine 6") # Unix-style line ending - already normalized
+
+# Test that literal \r in strings is preserved
+print(repr("test\rstring")) # Should show 'test\rstring' not 'test\nstring'
diff --git a/tests/micropython/test_normalize_newlines.py.exp b/tests/micropython/test_normalize_newlines.py.exp
new file mode 100644
index 000000000..c4395468c
--- /dev/null
+++ b/tests/micropython/test_normalize_newlines.py.exp
@@ -0,0 +1,8 @@
+Testing newline handling
+Line 1
+Line 2
+Line 3
+Line 4
+Line 5
+Line 6
+'test\rstring'