From b845595cbd66e305d46d03d3b9a16346ece8eecf Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 9 Jan 2020 14:49:11 +0100 Subject: [PATCH] Ignore empty options to (i)soltest --- test/Common.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/Common.cpp b/test/Common.cpp index 725902e25..a88871669 100644 --- a/test/Common.cpp +++ b/test/Common.cpp @@ -122,6 +122,11 @@ bool CommonOptions::parse(int argc, char const* const* argv) for (auto const& parsedOption: parsedOptions.options) if (parsedOption.position_key >= 0) { + if ( + parsedOption.original_tokens.empty() || + (parsedOption.original_tokens.size() == 1 && parsedOption.original_tokens.front().empty()) + ) + continue; // ignore empty options std::stringstream errorMessage; errorMessage << "Unrecognized option: "; for (auto const& token: parsedOption.original_tokens)