1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-04-29 20:23:55 +00:00

41 Commits

Author SHA1 Message Date
Philip Top
76d2cde656 Positional argument checks (#262)
* some tweaks with optional

* remove set_results function that was bypassing some of the result processing in some cases of config files.

* add positional Validator example and tests add CLI::Number validator.

* add positional Validator example and tests add CLI::Number validator.

* do some reformatting for style checks and remove auto in test lambda.
2019-04-11 12:04:30 +02:00
Philip Top
3f9fafd916 make immediate_callback inheritable, add tests for that and for valid strings, some cleanup in the README.md
Apply suggestions from code review

Co-Authored-By: phlptp <top1@llnl.gov>
allow callbacks for option_groups, and allow some other characters as flags
2019-03-22 17:56:36 -04:00
Philip Top
ed5cd89636 remove template for operator[] and adjust some tests
add some comments in readME about performance

move operator[] to return const Option *

Apply suggestions from code review

Co-Authored-By: phlptp <top1@llnl.gov>

update readme and add some IniTests and fix a bug from the tests

add_flag_callback

add a few tests to capture the different paths

fix incorrectly updated CMAKE file, and add some subcommand test for option finding

add disable_flag_override and work out some kinks in the find option functions

add some more tests and fix a few bugs in as<> function for options

Allow general flag types and default values, add shortcut notation for retrieving values
2019-02-23 07:40:41 +01:00
Philip Top
6c645b55a1 Add better enum support in the library (#233)
* add some notes about enums in the readme

add some helpers tests for enumerations

Add better enum support in the library

* fix Helpers Test for Enums
2019-02-20 22:57:37 +01:00
Philip Top
c8bd97156b click-style boolean flags (#219)
Updates to the readme

update the readme with some documentation

add a few more tests to complete code coverage

update with count strings in flags instead an array of strings for each count

add the '!' shortcut notation.  add some checks on the help output

allow the false flag syntax to support --option{false}

add a bool lexical cast to make everything consistent when converting to a bool.  Moved a few functions around

make the command line behave like the INI file wrt flags, flag options are allowed to process the value so `--flag=false` actually does the expected thing.

Add functionality similar to click style argument that allow specifying a false flag that when used generates a false result on the flag.
2019-02-09 23:51:38 +01:00
Henry Schreiner
b4910df3d7
Move to using literals in testing (#213) 2019-02-01 11:32:47 +01:00
Rafi Wiener
d3c3a4c58f add validator for ip address and positive number 2019-02-01 00:43:26 +01:00
Henry Schreiner
f932b51374
Touchupwin (#189)
* Move lambda funtion to real function

* Fix some warnings when compiling in LLVM

* Adding one test back in

* Adding details to changelog
2019-01-11 11:58:00 +01:00
Philip Top
ce6dc0723e add options to handle windows style command line options (#187)
* add some fields and functions for windows like options
add test cases for windows options and refactor for additional string functions

* try to fix code coverage to 100% again.  add some additional documentation and a few additional test cases to verify documentation

* remove some extra brackets
2019-01-10 23:07:17 +01:00
Philip Top
30c2e327d1 Add single string parsing (#186)
* add Tests and ability to handle program file inclusion in the single string.

add the ability to deal with a single string in the parse command and handle quoted string appropriately

* Add extra test cases for full coverage, clear up escape quote sequencing and handling of extra spaces
2019-01-06 10:30:49 +01:00
Henry Fredrick Schreiner
101d847c29 Use filter fn to simplify, sort includes 2018-05-06 18:36:33 +02:00
Henry Fredrick Schreiner
2b6b62c52c Adding smart validators 2018-05-03 17:04:13 +02:00
Henry Fredrick Schreiner
bea833bbcd Adding and fixing more warnings 2018-03-26 11:48:23 +02:00
Henry Schreiner
79a1847605
Overflow (#84)
* Overflowing an integer conversion now results in a conversion failure

* CMake improvements for VERSION and inital packing support

* Fix for recent addition of overflow check

* Conan file now gets version from Version.hpp file too
2018-03-10 09:50:25 +01:00
Anton
15f9a4f128 Add check if lexical_cast fully consumed input on integer conversion (#68)
* Split signed/unsigned parsing, add check if input is fully consumed, improve tests

* Fix complex numbers parsing

* Add check if input is fully consumed for double lexical_cast, improve tests

* Add non-num non-string lexical_cast for parsable types, add tests

* Style fixes from check-style

* Some small fixes for corner case tests
2018-03-09 13:01:19 +01:00
Lucas Czech
7868dc9f6c Add path exists validator. 2018-01-07 22:35:01 +01:00
Henry Fredrick Schreiner
78ed995685 Add multiline ini comments 2017-12-23 14:17:38 -06:00
Henry Fredrick Schreiner
85857d99e1 Return string for error message in validators 2017-11-24 21:11:28 -05:00
Henry Fredrick Schreiner
c6ddbeb281 Fix for spaces in names issue 2017-09-06 05:51:12 -05:00
Henry Fredrick Schreiner
27f718125d Reformat with clang-format 2017-05-31 12:03:05 -04:00
Henry Fredrick Schreiner
101c926dac Adding tidy cleanups (modernize) 2017-05-31 07:38:22 -04:00
Henry Fredrick Schreiner
e772c0e43b Trying to fix VS warning 2017-03-30 16:43:14 -04:00
Henry Fredrick Schreiner
43b451e327 Fix a few warnings, add to Changelog 2017-03-30 16:39:20 -04:00
Henry Fredrick Schreiner
f88aa33908 Fix a few errors and warnings with tests 2017-03-30 16:36:05 -04:00
Henry Fredrick Schreiner
ee9219e0f8 Adding warnings and fixes, CLI11 target, support for VIM Syntastic 2017-03-27 13:53:57 -04:00
Henry Fredrick Schreiner
0ca8a43ebd Better ini config behavour with one quote 2017-03-15 08:29:26 -04:00
Henry Fredrick Schreiner
d857b24786 Filling out string tools 2017-03-14 18:05:31 -04:00
Henry Fredrick Schreiner
bdf3993d09 Adding test for coverage, fixed bug in uncovered code 2017-03-09 09:37:16 -05:00
Henry Fredrick Schreiner
09afb2436f Adding test for bad name string long 2017-03-09 08:42:58 -05:00
Henry Fredrick Schreiner
2af5577b39 Adding missed update 2017-03-08 09:16:19 -05:00
Henry Fredrick Schreiner
228fd36cec Adding tests for Types, lexical casts, dropped useless and incorrect template 2017-03-08 09:15:35 -05:00
Henry Fredrick Schreiner
e23f56551d Adding Validator tests, fixed a bug 2017-03-08 08:25:10 -05:00
Henry Fredrick Schreiner
37f17fc19a Adding subcommand vectors and subsections 2017-03-03 17:25:27 -05:00
Henry Fredrick Schreiner
9d697b8511 Fallback support added, better structure 2017-03-02 12:02:44 -05:00
Henry Fredrick Schreiner
7856de43ca Broken tests only because adding new desired behavior 2017-03-01 16:01:29 -05:00
Henry Fredrick Schreiner
4fca03d031 Adding case check for subcommand (simple) 2017-02-20 13:23:05 -05:00
Henry Fredrick Schreiner
b4b456f594 Adding ini support for spaces filtering and quotes 2017-02-17 21:23:23 -05:00
Henry Fredrick Schreiner
0c1aa2abc3 Nicer, more compliant syntax in test 2017-02-13 12:41:08 -05:00
Henry Fredrick Schreiner
1d39e9f092 Adding ofstream method 2017-02-13 09:25:33 -05:00
Henry Fredrick Schreiner
77071fdb95 Adding tempfile helper 2017-02-13 08:59:53 -05:00
Henry Fredrick Schreiner
83eb7eb84b Splitting up tests 2017-02-12 16:18:53 -05:00