[Boost-bugs] [Boost C++ Libraries] #11893: boost program_options regression (--arg1 value) fails ( --arg1=value) ok

Subject: [Boost-bugs] [Boost C++ Libraries] #11893: boost program_options regression (--arg1 value) fails ( --arg1=value) ok
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-07 10:58:15


#11893: boost program_options regression (--arg1 value) fails ( --arg1=value) ok
------------------------------+-----------------------------
 Reporter: avibahra@… | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: program_options
  Version: Boost 1.61.0 | Severity: Regression
 Keywords: unix_style |
------------------------------+-----------------------------
 The following test passes with boost 1.53 and fails with boost > 1.59

    {
       // This test fails on boost 1.59, can't cope --arg1 10, only
 --arg1=10
       // *** It does not honour the default style i.e unix ***
       char* argv[] = {
             const_cast<char*>("test_program_options_implicit_value"),
             const_cast<char*>("--arg1"),
             const_cast<char*>("10")
       };

       po::variables_map vm;
       po::store(po::parse_command_line(3, argv, desc), vm);
       po::notify(vm);

       BOOST_CHECK_MESSAGE(vm.count("arg1"), "Expected arg1");
       BOOST_CHECK_MESSAGE(vm["arg1"].as<string>() == "10", "Expected arg1
 with value of 10 but found '" << vm["arg1"].as<string>() << "'");
    }

 In addition the default style is unix_style, which according to the header
 file
 should be able to cope with both styles.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11893>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC