Handle malformed UTF-8 output in test runner.
Thanks, Michel!
This commit is contained in:
parent
f7849244a8
commit
db9e5737f6
@ -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 = []
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user