diff -r 6bfe43dd20eb -r 8bce3e51b101 tests/run-tests.py --- a/tests/run-tests.py Tue Oct 17 11:07:18 2017 -0700 +++ b/tests/run-tests.py Tue Oct 17 10:33:27 2017 -0700 @@ -1663,7 +1663,9 @@ self.stream.write('t') else: if not self._options.nodiff: - formatted = '\nERROR: %s output changed\n' % test + self.stream.write('\n') + # Exclude the '\n' from highlighting to lex correctly + formatted = 'ERROR: %s output changed\n' % test self.stream.write(highlightmsg(formatted, self.color)) self.stream.write('!')