diff options
author | Anthony Towns <aj@erisian.com.au> | 2017-12-12 17:39:09 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2018-01-04 00:02:52 +1000 |
commit | c99a3c32c830384a9959a468a13441fcd2e48a72 (patch) | |
tree | 6a61ac4f9d1b4e28a14956433e79a559b8393c59 /src/test/util_tests.cpp | |
parent | 20166f8a448156f476f3e23825f59ebec36424a9 (diff) |
[tests] util_tests.cpp: actually check ignored args
An array with 7 elements was setup for checking argument parsing, but
was passed to ParseParamaeters with argc=5, meaning the interpretation
of the last two arguments was never actually checked.
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r-- | src/test/util_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 998090cd9b..30c7fea607 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(util_ParseParameters) testArgs.ParseParameters(1, (char**)argv_test); BOOST_CHECK(testArgs.GetMapArgs().empty() && testArgs.GetMapMultiArgs().empty()); - testArgs.ParseParameters(5, (char**)argv_test); + testArgs.ParseParameters(7, (char**)argv_test); // expectation: -ignored is ignored (program name argument), // -a, -b and -ccc end up in map, -d ignored because it is after // a non-option argument (non-GNU option parsing) |