diff --git a/test/cmdline_test.cpp b/test/cmdline_test.cpp index e8eda74..16a6828 100644 --- a/test/cmdline_test.cpp +++ b/test/cmdline_test.cpp @@ -522,6 +522,84 @@ void test_style_parser() BOOST_CHECK_EQUAL(result[1].value[0], "1"); } +void test_unregistered() +{ + // Check unregisted option when no options are registed at all. + options_description desc; + + vector input; + input.push_back("--foo=1"); + input.push_back("--bar"); + input.push_back("1"); + input.push_back("-b"); + input.push_back("-biz"); + + detail::cmdline cmd(input); + cmd.set_options_description(desc); + cmd.allow_unregistered(); + + vector