CI: fix --version tests (#5790)

This commit is contained in:
Daniel Marjamäki 2023-12-22 19:57:55 +01:00
parent 5968a418b9
commit 1324a808b5
1 changed files with 2 additions and 2 deletions

View File

@ -410,7 +410,7 @@ private:
REDIRECT; REDIRECT;
const char * const argv[] = {"cppcheck", "--version"}; const char * const argv[] = {"cppcheck", "--version"};
ASSERT_EQUALS(CmdLineParser::Result::Exit, parser->parseFromArgs(2, argv)); ASSERT_EQUALS(CmdLineParser::Result::Exit, parser->parseFromArgs(2, argv));
ASSERT_EQUALS("Cppcheck 2.13 dev\n", logger->str()); ASSERT(logger->str().compare(0, 11, "Cppcheck 2.") == 0);
} }
void versionWithCfg() { void versionWithCfg() {
@ -431,7 +431,7 @@ private:
REDIRECT; REDIRECT;
const char * const argv[] = {"cppcheck", "--library=missing", "--version"}; const char * const argv[] = {"cppcheck", "--library=missing", "--version"};
ASSERT_EQUALS(CmdLineParser::Result::Exit, parser->parseFromArgs(3, argv)); ASSERT_EQUALS(CmdLineParser::Result::Exit, parser->parseFromArgs(3, argv));
ASSERT_EQUALS("Cppcheck 2.13 dev\n", logger->str()); ASSERT(logger->str().compare(0, 11, "Cppcheck 2.") == 0);
} }
void versionWithInvalidCfg() { void versionWithInvalidCfg() {