Skip to content

Commit

Permalink
fix CRLF support of runtest.py (kanaka#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
OldLiu001 committed Jul 10, 2023
1 parent f832475 commit 01d46eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ class TestReader:
def __init__(self, test_file):
self.line_num = 0
f = open(test_file, newline='') if IS_PY_3 else open(test_file)
self.data = f.read().split('\n')

# See: https://github.com/kanaka/mal/pull/640
self.data = f.read().replace('\r\n', '\n').replace('\r', '\n').split('\n')

self.soft = False
self.deferrable = False
self.optional = False
Expand Down

0 comments on commit 01d46eb

Please sign in to comment.