[Lldb-commits] [PATCH] D35525: Fix "help format" output
Jessica Han via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 20 18:29:14 PDT 2017
jessicah updated this revision to Diff 107623.
jessicah added a comment.
A test case was added.
https://reviews.llvm.org/D35525
Files:
packages/Python/lldbsuite/test/help/TestHelp.py
source/Interpreter/CommandInterpreter.cpp
Index: source/Interpreter/CommandInterpreter.cpp
===================================================================
--- source/Interpreter/CommandInterpreter.cpp
+++ source/Interpreter/CommandInterpreter.cpp
@@ -2569,7 +2569,7 @@
while (!text.empty()) {
if (text.front() == '\n' ||
- (text.front() == ' ' && nextWordLength(text.ltrim(' ')) < chars_left)) {
+ (text.front() == ' ' && nextWordLength(text.ltrim(' ')) > chars_left)) {
strm.EOL();
strm.Indent();
chars_left = max_columns - indent_size;
Index: packages/Python/lldbsuite/test/help/TestHelp.py
===================================================================
--- packages/Python/lldbsuite/test/help/TestHelp.py
+++ packages/Python/lldbsuite/test/help/TestHelp.py
@@ -230,3 +230,12 @@
'command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help')
self.expect("help averyfriendlyalias", matching=True,
substrs=['I am a very friendly alias'])
+ @no_debug_info_test
+ def test_help_format_output(self):
+ """Test that help output reaches TerminalWidth."""
+ self.runCmd(
+ 'settings set term-width 108')
+ self.expect(
+ "help format",
+ matching=True,
+ substrs=['<format> -- One of the format names'])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35525.107623.patch
Type: text/x-patch
Size: 1346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170721/43a25995/attachment.bin>
More information about the lldb-commits
mailing list