summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-11 15:03:57 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-11 15:03:57 +0100
commitc3dcb590b8d8557c9aafdf308c29f3815d600a9c (patch)
treea8ef8cd54e75a4e2795c751f02e0a04a762f29c7
parent18ceb7055b43d158e46ff6d0a0389bc3cd05e5d5 (diff)
parenta4dbc73e8a7b614ac4e95df750659e10ec92cfc9 (diff)
Merge pull request #603 from stinos/windows-tests-newline
tests: Fix handling of newlines from expected output files on windows
-rwxr-xr-xtests/run-tests4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/run-tests b/tests/run-tests
index 9de65723c..102655abe 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: