[med-svn] [Git][med-team/libargs][upstream] New upstream version 6.2.4
Nilesh Patra
gitlab at salsa.debian.org
Fri Nov 6 18:04:47 GMT 2020
Nilesh Patra pushed to branch upstream at Debian Med / libargs
Commits:
0e404ed6 by Nilesh Patra at 2020-11-06T23:30:47+05:30
New upstream version 6.2.4
- - - - -
2 changed files:
- args.hxx
- test.cxx
Changes:
=====================================
args.hxx
=====================================
@@ -50,6 +50,7 @@
#include <unordered_set>
#include <type_traits>
#include <cstddef>
+#include <iostream>
#if defined(_MSC_VER) && _MSC_VER <= 1800
#define noexcept
@@ -2351,7 +2352,7 @@ namespace args
while (valueIt != end &&
values.size() < nargs.max &&
- (nargs.min == nargs.max || ParseOption(*valueIt) == OptionType::Positional))
+ (values.size() < nargs.min || ParseOption(*valueIt) == OptionType::Positional))
{
if (Complete(flag, valueIt, end))
{
=====================================
test.cxx
=====================================
@@ -695,8 +695,8 @@ TEST_CASE("Nargs work as expected", "[args]")
REQUIRE_THROWS_AS(parser.ParseArgs(std::vector<std::string>{"-a1"}), args::ParseError);
REQUIRE_THROWS_AS(parser.ParseArgs(std::vector<std::string>{"-a1", "2"}), args::ParseError);
- REQUIRE_NOTHROW(parser.ParseArgs(std::vector<std::string>{"-b", "1", "2", "-f"}));
- REQUIRE((args::get(b) == std::vector<int>{1, 2}));
+ REQUIRE_NOTHROW(parser.ParseArgs(std::vector<std::string>{"-b", "1", "-2", "-f"}));
+ REQUIRE((args::get(b) == std::vector<int>{1, -2}));
REQUIRE(args::get(f) == true);
REQUIRE_NOTHROW(parser.ParseArgs(std::vector<std::string>{"-b", "1", "2", "3"}));
View it on GitLab: https://salsa.debian.org/med-team/libargs/-/commit/0e404ed62594b66a41f9018ad4081c3a815a0264
--
View it on GitLab: https://salsa.debian.org/med-team/libargs/-/commit/0e404ed62594b66a41f9018ad4081c3a815a0264
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201106/e9657d90/attachment-0001.html>
More information about the debian-med-commit
mailing list