Add test for --check-config.

This commit is contained in:
Kimmo Varis 2011-05-04 21:07:02 +03:00
parent e7c56aebac
commit 959a73f02e
1 changed files with 11 additions and 0 deletions

View File

@ -99,6 +99,7 @@ private:
TEST_CASE(ignorepaths4)
TEST_CASE(ignorefilepaths1)
TEST_CASE(ignorefilepaths2)
TEST_CASE(checkconfig)
TEST_CASE(unknownParam);
}
@ -801,6 +802,16 @@ private:
ASSERT_EQUALS("src/foo.cpp", parser.GetIgnoredPaths()[0]);
}
void checkconfig()
{
REDIRECT;
const char *argv[] = {"cppcheck", "--check-config", "file.cpp"};
Settings settings;
CmdLineParser parser(&settings);
ASSERT(parser.ParseFromArgs(3, argv));
ASSERT_EQUALS(true, settings.checkConfiguration);
}
void unknownParam()
{
REDIRECT;