Commit Graph

26 Commits

Author SHA1 Message Date
Eyal Rozenberg
589d55837e Fixes #1: Support for multiple long names per option
An unintrusive implementation - no existing interfaces changed, and a single addition for obtaining all of the different long names.

Notes:

* Tests added for the new functionality, and existing tests expanded to take it into account.
* It is now impossible to specify long names with commas in them (but then, that wasn't properly supported before either, more of an oversight).
* The multiple long options are not included in the usage information - just the first one of them is printed
2018-06-27 22:25:43 +03:00
Vladimir Prus
ed72cc2f92 Add tests for the current implicit_value behaviour. 2017-06-10 22:44:09 +03:00
Vladimir Prus
7729850bb7 Make options with implicit value use next token.
This commit reverts:

    - 88dea3c6fd.
    "Stop options with implicit value from consuming separate tokens."

    - 0c01e9aadc.
    "Add testing for implicit_values and non-consuming of separate tokens."

These commits from 2014 made options with implicit_value set only
consult value in the same token. The problem is that now implicit_value,
a sematic properly, forces a particular syntax, which proved to be
confusing.
2017-06-10 22:44:09 +03:00
Michael John Decker
0c01e9aadc Add testing for implicit_values and non-consuming of separate tokens. 2014-12-31 02:04:17 +03:00
Vladimir Prus
145e5728d7 Unbreak cmdline_test.
There was a k-vs-j loop error introduced by a prior comment.
2014-12-30 10:15:10 +03:00
Marcel Raad
1a17f20532 Compile fix for MSVC 14
Also fixes some new variable shadowing warnings
in cmdline_test with Visual C++ 14.
2014-11-24 17:16:21 +03:00
Vladimir Prus
825562ed1e Add more testscases. Addresses #4469.
[SVN r67773]
2011-01-08 10:49:06 +00:00
Sascha Ochsenknecht
a5e45eda5f reactive case_insensitive style for cmdline
[SVN r58273]
2009-12-10 20:25:53 +00:00
Sascha Ochsenknecht
9a04daa2b2 Better detection of missing values on command line, Fixes #3423
[SVN r58184]
2009-12-06 09:52:53 +00:00
Vladimir Prus
e1010ad09e Fix warnings.
Addresses #3603.
Patch from Sascha Ochsenknecht.


[SVN r57535]
2009-11-10 06:59:54 +00:00
Vladimir Prus
86aeaf478d Don't use boost.test for testing.
[SVN r40463]
2007-10-25 17:08:27 +00:00
Vladimir Prus
274cd2e682 Fix ambiguity between 'std::detail' and 'program_options::detail' on cw.
[SVN r28692]
2005-05-06 08:13:32 +00:00
Vladimir Prus
b5bc8b4fcb Add test for unregisted options.
[SVN r28691]
2005-05-06 08:12:27 +00:00
Vladimir Prus
d4748e8153 Fix a regression -- the if the 'style' argument to parse_command_line
function was zero, it was interpreted as no style is suppored. Previously,
it was interpreted as default_styles. Also, remove 'style' argument from
'cmdline' constructors.


[SVN r28500]
2005-04-27 07:02:39 +00:00
Vladimir Prus
efc9712f70 Check for invalid options in vector<option> returned by extra style
parser or additional parser.


[SVN r28468]
2005-04-25 09:06:44 +00:00
Vladimir Prus
94d186836e Derive basic_command_line_parser from cmdline.
Eliminate 'common_command_line_parser'.


[SVN r28419]
2005-04-22 15:32:23 +00:00
Vladimir Prus
6565cbc334 Revive 'additional parser'.
[SVN r28415]
2005-04-22 14:05:17 +00:00
Vladimir Prus
c984d59de1 Refactor the command line parser so that it uses options_description,
as opposed to having his own data structures. Clean up option description
classes a bit, removing unneeded methods. Remove support for 'implicit'
options.


[SVN r28413]
2005-04-22 13:35:45 +00:00
Vladimir Prus
b4192e34b9 Another set of doc/comment edits from Charles.
[SVN r24657]
2004-08-23 10:18:09 +00:00
Stefan Slapeta
b4f699c0de Fix for CW 9 (namespace ambiguity)
[SVN r24267]
2004-08-03 13:45:15 +00:00
Vladimir Prus
fa2257def0 Really fix CW9 problem.
[SVN r23948]
2004-07-22 09:47:48 +00:00
Vladimir Prus
3173707873 Workaround CW9 problem.
[SVN r23943]
2004-07-22 08:18:59 +00:00
Vladimir Prus
df45b22508 More vc6 workarounds.
[SVN r23101]
2004-06-15 09:15:32 +00:00
Vladimir Prus
b6f9e1f367 Workaround for vc6/vc7.
[SVN r23081]
2004-06-11 06:11:34 +00:00
Vladimir Prus
6735b65175 Some borland fixes.
[SVN r23068]
2004-06-10 08:35:36 +00:00
Vladimir Prus
196f6c0b5b Import revision 295 of the program_options library.
[SVN r22823]
2004-05-14 13:40:31 +00:00