-------------------------------------------------------------------------
| 30 | { |
| 31 | //------------------------------------------------------------------------- |
| 32 | TEST(WarningManagerTests, CommandLineTooLong) |
| 33 | { |
| 34 | std::string stdOut; |
| 35 | const std::vector<std::pair<std::string, std::string>> |
| 36 | coverageArguments = { |
| 37 | {ProgramOptions::SelectedSourcesOption, |
| 38 | TestCoverageConsole::GetMainCppPath().string()}, |
| 39 | {ProgramOptions::SelectedModulesOption, |
| 40 | TestCoverageConsole::GetOutputBinaryPath().string()}, |
| 41 | {ProgramOptions::QuietOption, ""}}; |
| 42 | std::vector<std::wstring> arguments{TestCoverageConsole::TestBasic}; |
| 43 | |
| 44 | RunCoverageFor(coverageArguments, |
| 45 | TestCoverageConsole::GetOutputBinaryPath(), |
| 46 | arguments, |
| 47 | &stdOut); |
| 48 | ASSERT_EQ("", stdOut); |
| 49 | for (int i = 0; i < OptionsParser::DosCommandLineMaxSize / 10; ++i) |
| 50 | arguments.push_back(L"01223456789"); |
| 51 | |
| 52 | RunCoverageFor(coverageArguments, |
| 53 | TestCoverageConsole::GetOutputBinaryPath(), |
| 54 | arguments, |
| 55 | &stdOut); |
| 56 | auto output = Tools::LocalToWString(stdOut); |
| 57 | ASSERT_TRUE(boost::algorithm::contains( |
| 58 | output, OptionsParser::GetTooLongCommandLineMessage())); |
| 59 | } |
| 60 | } |
nothing calls this directly
no test coverage detected