1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-01 13:13:53 +00:00

Help for defaulted vector

This commit is contained in:
Henry Fredrick Schreiner 2017-03-15 09:15:29 -04:00
parent f6e771a248
commit c5cdace048

View File

@ -109,6 +109,16 @@ TEST(THelp, MultiOpts) {
EXPECT_THAT(help, HasSubstr("INT ...")); EXPECT_THAT(help, HasSubstr("INT ..."));
} }
TEST(THelp, VectorOpts) {
CLI::App app{"My prog"};
std::vector<int> x = {1,2};
app.add_option("-q,--quick", x, "", true);
std::string help = app.help();
EXPECT_THAT(help, HasSubstr("INT=[1,2] ..."));
}
TEST(THelp, MultiPosOpts) { TEST(THelp, MultiPosOpts) {
CLI::App app{"My prog"}; CLI::App app{"My prog"};
std::vector<int> x, y; std::vector<int> x, y;