diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index f280d3fd1db..1a2df20477b 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -344,8 +344,8 @@ def parseIntegratedTestScriptCommands(source_path): data = f.read() # Ensure the data ends with a newline. - if not data.endswith('\n'): - data = data + '\n' + if not data.endswith(to_bytes('\n')): + data = data + to_bytes('\n') # Iterate over the matches. line_number = 1