Fixed #4013 (Several test failures in testcmdlineparser.cpp)

This commit is contained in:
Daniel Marjamäki 2012-09-14 06:58:14 +02:00
parent 19fdbf0fd0
commit 3e58472cd3
2 changed files with 5 additions and 1 deletions

View File

@ -362,6 +362,10 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[])
if (define.find("=") == std::string::npos)
define += "=1";
// DEF= => empty define
else if (define.find("=") + 1U == define.size())
define.erase(define.size() - 1U);
if (!_settings->userDefines.empty())
_settings->userDefines += ";";
_settings->userDefines += define;

View File

@ -51,7 +51,7 @@ private:
TEST_CASE(defines);
TEST_CASE(defines2);
TEST_CASE(defines3);
//TEST_CASE(defines4);
TEST_CASE(defines4);
TEST_CASE(enforceLanguage);
TEST_CASE(includesnopath);
TEST_CASE(includes);