On Tue, Jul 25, 2017 at 6:24 PM, Dominique Devienne <ddevienne@gmail.com> wrote:
I'm trying to understand what's going on;
obviously there's some kind of semantic change with optional argument to switches.

Could anyone shed some light on this please? I'm not sure how to proceed now. TIA, -DD

OK, maybe with a small stand-alone program, I'll have more chances of getting help.
...
Is this a regression? Given [2] I'd say yes, but given that test_implicit_value() [3] does test something similar
to what I'm doing, I'm a bit baffled by my little example not working properly. What am I missing? Thanks, --DD



Rah, the test code in 1.64 reads like
    test_case test_cases1[] = {
        {"--foo bar", s_success, "foo: positional:bar"},
        {"--foo=bar foobar", s_success, "foo:bar positional:foobar"},
        {0, 0, 0}
    }; 

while the one on the develop branch behaves as 1.56 and the way I need! (see below)
So it means Vladimir hasn't merged these commits into the release, despite predating it :(
Bummer bummer bummer... Specific reasons this wasn't done? Will they be in 1.65? --DD

test_case test_cases1[] = {
// 'bar' does not even look like option, so is consumed
{"--foo bar", s_success, "foo:bar"},

// '--bar' looks like option, and such option exists, so we don't consume this token
{"--foo --bar", s_success, "foo: bar:"},

// '--biz' looks like option, but does not match any existing one.
// Presently this results in parse error, since
// (1) in cmdline.cpp:finish_option, we only consume following tokens if they are
// requires
// (2) in cmdline.cpp:run, we let options consume following positional options
// For --biz, an exception is thrown between 1 and 2.
// We might want to fix that in future.
{"--foo --biz", s_unknown_option, ""},
{0, 0, 0}
};