mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
run-tests: don't disable linewrapping if there is nothing to output
Summary: The tests for run-tests expect there to be no linewrapping control characters output when there are no progress lines to print. Make sure they only get printed if there are lines to print. Reviewed By: DurhamG Differential Revision: D14851271 fbshipit-source-id: 4004f848e2e205d36bd0dd107ced2fe9d69e31d8
This commit is contained in:
parent
0af9f95998
commit
0cc0028d21
@ -2160,10 +2160,11 @@ class Progress(object):
|
||||
moveup -= toclear
|
||||
if moveup > 0:
|
||||
content += "\033[%dA" % moveup
|
||||
# Disable line wrapping while outputing the progress entries
|
||||
content += "\x1b[?7l"
|
||||
content += "\n".join("\r\033[K%s" % line.rstrip() for line in lines)
|
||||
content += "\x1b[?7h"
|
||||
if lines:
|
||||
# Disable line wrapping while outputing the progress entries
|
||||
content += "\x1b[?7l"
|
||||
content += "\n".join("\r\033[K%s" % line.rstrip() for line in lines)
|
||||
content += "\x1b[?7h"
|
||||
self._write(content)
|
||||
self.lines = lines
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user