Mercurial > hg
comparison tests/run-tests.py @ 34842:8bce3e51b101
run-tests: move newline out of colorized message
The leading newline before "ERROR:" led to an incorrect lexing of the
message and the newline got lost.
The fixed formatting can be seen in the test case. The reason we
didn't notice before was that the bad formatting just led to the loss
of a blank line in the test. However, there are other cases where it
would be joined with a line saying "Accept this change? [n]" or
"Reference output has changed (run again to prompt changes)".
Differential Revision: https://phab.mercurial-scm.org/D1159
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 17 Oct 2017 10:33:27 -0700 |
parents | 149109c96904 |
children | a18eef03d879 f948c5b3f5c9 |
comparison
equal
deleted
inserted
replaced
34841:6bfe43dd20eb | 34842:8bce3e51b101 |
---|---|
1661 with iolock: | 1661 with iolock: |
1662 if reason == "timed out": | 1662 if reason == "timed out": |
1663 self.stream.write('t') | 1663 self.stream.write('t') |
1664 else: | 1664 else: |
1665 if not self._options.nodiff: | 1665 if not self._options.nodiff: |
1666 formatted = '\nERROR: %s output changed\n' % test | 1666 self.stream.write('\n') |
1667 # Exclude the '\n' from highlighting to lex correctly | |
1668 formatted = 'ERROR: %s output changed\n' % test | |
1667 self.stream.write(highlightmsg(formatted, self.color)) | 1669 self.stream.write(highlightmsg(formatted, self.color)) |
1668 self.stream.write('!') | 1670 self.stream.write('!') |
1669 | 1671 |
1670 self.stream.flush() | 1672 self.stream.flush() |
1671 | 1673 |