mirror of
https://github.com/CLIUtils/CLI11.git
synced 2026-01-19 04:52:08 +00:00
Aligment in multiline description (#269)
This commit is contained in:
@@ -470,6 +470,18 @@ TEST(THelp, CustomHelp) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(THelp, NextLineShouldBeAlignmentInMultilineDescription) {
|
||||
CLI::App app;
|
||||
int i;
|
||||
const std::string first{"first line"};
|
||||
const std::string second{"second line"};
|
||||
app.add_option("-i,--int", i, first + "\n" + second);
|
||||
|
||||
const std::string help = app.help();
|
||||
const auto width = app.get_formatter()->get_column_width();
|
||||
EXPECT_THAT(help, HasSubstr(first + "\n" + std::string(width, ' ') + second));
|
||||
}
|
||||
|
||||
TEST(THelp, NiceName) {
|
||||
CLI::App app;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user