Skip to content

Commit

Permalink
add seqan3::
Browse files Browse the repository at this point in the history
  • Loading branch information
smehringer committed Mar 17, 2020
1 parent 20b5e83 commit b2e8727
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions test/unit/argument_parser/detail/format_help_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ TEST(help_page_printing, advanced_options)
auto set_up = [&option_value, &flag_value] (seqan3::argument_parser & parser)
{
parser.add_section("default section");
parser.add_option(option_value, 'i', "int", "this is a int option.", option_spec::DEFAULT);
parser.add_section("advanced section", option_spec::ADVANCED);
parser.add_subsection("advanced subsection", option_spec::ADVANCED);
parser.add_option(option_value, 'j', "jnt", "this is a int option.", option_spec::ADVANCED);
parser.add_flag(flag_value, 'f', "flag", "this is a flag.", option_spec::ADVANCED);
parser.add_list_item("-s, --some", "list item.", option_spec::ADVANCED);
parser.add_line("some line.", true, option_spec::ADVANCED);
parser.add_option(option_value, 'i', "int", "this is a int option.", seqan3::option_spec::DEFAULT);
parser.add_section("advanced section", seqan3::option_spec::ADVANCED);
parser.add_subsection("advanced subsection", seqan3::option_spec::ADVANCED);
parser.add_option(option_value, 'j', "jnt", "this is a int option.", seqan3::option_spec::ADVANCED);
parser.add_flag(flag_value, 'f', "flag", "this is a flag.", seqan3::option_spec::ADVANCED);
parser.add_list_item("-s, --some", "list item.", seqan3::option_spec::ADVANCED);
parser.add_line("some line.", true, seqan3::option_spec::ADVANCED);
};

// without -hh, only the non/advanced information are shown
Expand All @@ -234,7 +234,8 @@ TEST(help_page_printing, advanced_options)
"-i, --int (signed 32 bit integer)\n"
"this is a int option. Default: 5.\n" +
basic_version_str;
EXPECT_TRUE(ranges::equal((std_cout | std::views::filter(!is_space)), expected | std::views::filter(!is_space)));
EXPECT_TRUE(ranges::equal((std_cout | std::views::filter(!seqan3::is_space)),
expected | std::views::filter(!seqan3::is_space)));

// with -hh everything is shown
seqan3::argument_parser parser_advanced_help{"test_parser", 2, argv2};
Expand All @@ -258,7 +259,8 @@ TEST(help_page_printing, advanced_options)
" list item.\n"
"some line.\n"+
basic_version_str;
EXPECT_TRUE(ranges::equal((std_cout | std::views::filter(!seqan3::is_space)), expected | std::views::filter(!seqan3::is_space)));
EXPECT_TRUE(ranges::equal((std_cout | std::views::filter(!seqan3::is_space)),
expected | std::views::filter(!seqan3::is_space)));
}

enum class foo
Expand Down

0 comments on commit b2e8727

Please sign in to comment.