diff options
author | stijn <stinos@zoho.com> | 2014-05-11 12:45:02 +0200 |
---|---|---|
committer | stijn <stinos@zoho.com> | 2014-05-11 12:45:02 +0200 |
commit | a4dbc73e8a7b614ac4e95df750659e10ec92cfc9 (patch) | |
tree | 039e758d0c4bec1cf8b3ae71e1f030e681113481 | |
parent | b2d4fc06fc95d8e96eabd6ef470f0e871275fb82 (diff) | |
download | micropython-a4dbc73e8a7b614ac4e95df750659e10ec92cfc9.tar.gz micropython-a4dbc73e8a7b614ac4e95df750659e10ec92cfc9.zip |
tests: Fix handling of newlines from expected output files
-rwxr-xr-x | tests/run-tests | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/run-tests b/tests/run-tests index 9de65723c4..102655abea 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -44,8 +44,10 @@ def run_tests(pyb, tests): # expected output given by a file, so read that in with open(test_file_expected, 'rb') as f: output_expected = f.read() + if os.name == 'nt': + output_expected = output_expected.replace(b'\n', b'\r\n') else: - # run CPython to work out expeceted output + # run CPython to work out expected output try: output_expected = subprocess.check_output([CPYTHON3, '-B', test_file]) except subprocess.CalledProcessError: |