Handle malformed UTF-8 output in test runner.
Thanks, Michel!
This commit is contained in:
+6
-2
@@ -151,8 +151,12 @@ def run_test(path):
|
||||
# Invoke wren and run the test.
|
||||
proc = Popen([WREN_APP, path], stdin=PIPE, stdout=PIPE, stderr=PIPE)
|
||||
(out, err) = proc.communicate(input_bytes)
|
||||
out = out.decode("utf-8").replace('\r\n', '\n')
|
||||
err = err.decode("utf-8").replace('\r\n', '\n')
|
||||
|
||||
try:
|
||||
out = out.decode("utf-8").replace('\r\n', '\n')
|
||||
err = err.decode("utf-8").replace('\r\n', '\n')
|
||||
except:
|
||||
fails.append('Error decoding output.')
|
||||
|
||||
fails = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user