diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index b1bb5ecd5..3e8bc6ce5 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -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;