mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Here, the user gave an argument name but failed to provide the required parameters to the argument. Tell the user which argument wants more. This is an API change that may affect programs trying to match the specific "Too few arguments" message. The new error message appends the user-supplied argument that caused the error. A solution which works with both versions is to look for "Too few arguments" at the beginning of the error message. - if (err.what() == "Too few arguments") + if (std:string(err.what()).rfind("Too few arguments", 0) == 0) Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu> |
||
---|---|---|
.. | ||
.gitignore | ||
CMakeLists.txt | ||
doctest.hpp | ||
main.cpp | ||
README.md | ||
test_actions.cpp | ||
test_append.cpp | ||
test_compound_arguments.cpp | ||
test_const_correct.cpp | ||
test_container_arguments.cpp | ||
test_get.cpp | ||
test_help.cpp | ||
test_invalid_arguments.cpp | ||
test_is_used.cpp | ||
test_issue_37.cpp | ||
test_negative_numbers.cpp | ||
test_optional_arguments.cpp | ||
test_parent_parsers.cpp | ||
test_parse_args.cpp | ||
test_positional_arguments.cpp | ||
test_repr.cpp | ||
test_required_arguments.cpp | ||
test_scan.cpp | ||
test_utility.hpp | ||
test_value_semantics.cpp | ||
test_version.cpp |
Argparse Tests
Linux
$ mkdir build
$ cd build
$ cmake ../.
$ make
$ ./tests
Windows
- Generate Visual Studio solution
$ mkdir build
$ cd build
$ cmake ../. -G "Visual Studio 15 2017"
- Open ARGPARSE.sln
- Build tests in RELEASE | x64
- Run tests.exe