Skip to content

Commit 2be8d4b

Browse files
authored
[test] Fix bug in check_line_endings. NFC (#24503)
Looks like it was me that broke this back in 265908b.
1 parent 16dc866 commit 2be8d4b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

test/line_endings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def check_line_endings(filename, expect_only=None, print_errors=True, print_info
4848
data = data.replace(b'\r\n', b'A')
4949
has_dos_line_endings = True
5050

51-
index = data.find(b'\r\n')
51+
index = data.find(b'\n')
5252
if index != -1:
5353
unix_line_ending_example = data[index - 50:index + 50].replace(b'\r', b'\\r').replace(b'\n', b'\\n')
5454
unix_line_ending_count = data.count(b'\n')

test/test_other.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9014,8 +9014,7 @@ def test_output_eol(self, params):
90149014
expected_ending = '\n'
90159015
else:
90169016
expected_ending = '\r\n'
9017-
9018-
self.assertEqual(line_endings.check_line_endings(f, expect_only=expected_ending), 0, f'expected on ly {eol} line endingsn in {f}')
9017+
self.assertEqual(line_endings.check_line_endings(f, expect_only=expected_ending), 0, f'expected only {eol} line endings in {f}')
90199018

90209019
def test_bad_memory_size(self):
90219020
# if user changes INITIAL_MEMORY at runtime, the wasm module may not accept the memory import if

0 commit comments

Comments
 (0)