Don't return an error from --help

This commit is contained in:
Kamil Śliwak 2021-10-11 13:30:08 +02:00
parent a1c9c1e2b5
commit 0417db0f6a
2 changed files with 2 additions and 2 deletions

View File

@ -607,7 +607,7 @@ bool CommandLineInterface::processInput()
{ {
case InputMode::Help: case InputMode::Help:
CommandLineParser::printHelp(sout()); CommandLineParser::printHelp(sout());
return false; break;
case InputMode::License: case InputMode::License:
printLicense(); printLicense();
break; break;

View File

@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(help)
{ {
OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles({"solc", "--help"}, "", /* _processInput */ true); OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles({"solc", "--help"}, "", /* _processInput */ true);
BOOST_TEST(!result.success); BOOST_TEST(result.success);
BOOST_TEST(boost::starts_with(result.stdoutContent, "solc, the Solidity commandline compiler.")); BOOST_TEST(boost::starts_with(result.stdoutContent, "solc, the Solidity commandline compiler."));
BOOST_TEST(result.stderrContent == ""); BOOST_TEST(result.stderrContent == "");
BOOST_TEST(result.options.input.mode == InputMode::Help); BOOST_TEST(result.options.input.mode == InputMode::Help);