summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2015-10-30 11:15:46 +0100
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-31 14:11:19 +0300
commit24b03561bdc8715d23684584f5d40afd9d965614 (patch)
tree02bdf62155765d859c0f81963666d34fe39bdcf0
parentbd9f850e859c976780c5dea98756216a050db016 (diff)
downloadmicropython-24b03561bdc8715d23684584f5d40afd9d965614.tar.gz
micropython-24b03561bdc8715d23684584f5d40afd9d965614.zip
tests: Make sure test output has \r\n line-ends when running on Windows
This is the case already when using just subprocess.check_output, but in the special cases (cmdline, meminfo, ...) the carriage return gets lost during output processing so restore it in the end. This fixes the micropython/meminfo.py test on Windows.
-rwxr-xr-xtests/run-tests2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/run-tests b/tests/run-tests
index 7df9563137..b275be0064 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -135,6 +135,8 @@ def run_micropython(pyb, args, test_file):
if i_mupy >= len(lines_mupy):
break
output_mupy = b''.join(lines_mupy)
+ if os.name == 'nt':
+ output_mupy = output_mupy.replace(b'\n', b'\r\n')
else:
# a standard test