diff --git a/include/CLI/impl/Option_inl.hpp b/include/CLI/impl/Option_inl.hpp index ae78a2630..b37be4021 100644 --- a/include/CLI/impl/Option_inl.hpp +++ b/include/CLI/impl/Option_inl.hpp @@ -668,7 +668,7 @@ CLI11_INLINE int Option::_add_result(std::string &&result, std::vector cv{ "test" }; + app.add_option("-c", cv); + args = { "-c","test1", "[]"}; + + run(); + CHECK(cv.size()==1); + args = { "-c","test1", "[[]]"}; + + run(); + CHECK(cv.size()==2); + CHECK(cv[1]=="[]"); +} + TEST_CASE_METHOD(TApp, "vectorDoubleArg", "[optiontype]") { std::vector> cv; diff --git a/tests/fuzzFail/round_trip_custom3 b/tests/fuzzFail/round_trip_custom3 new file mode 100644 index 000000000..e7991992d Binary files /dev/null and b/tests/fuzzFail/round_trip_custom3 differ