forked from OSchip/llvm-project
Fix the formatting for help on option value types.
Patch by Jessica Han <jessicah@juniper.net> https://reviews.llvm.org/D35525 llvm-svn: 309238
This commit is contained in:
parent
2195e13676
commit
a81bd7f101
|
@ -230,3 +230,12 @@ class HelpCommandTestCase(TestBase):
|
|||
'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'])
|
||||
|
|
|
@ -2569,7 +2569,7 @@ void CommandInterpreter::OutputHelpText(Stream &strm, llvm::StringRef word_text,
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue