mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
test: Make system_tests/run_command
locale agnostic
This commit is contained in:
parent
3db23fd821
commit
884304e6c6
1 changed files with 2 additions and 8 deletions
|
@ -51,15 +51,9 @@ BOOST_AUTO_TEST_CASE(run_command)
|
|||
}
|
||||
{
|
||||
// An invalid command is handled by Boost
|
||||
#ifdef WIN32
|
||||
const std::string expected{"The system cannot find the file specified."};
|
||||
#else
|
||||
const std::string expected{"No such file or directory"};
|
||||
#endif
|
||||
BOOST_CHECK_EXCEPTION(RunCommandParseJSON("invalid_command"), boost::process::process_error, [&](const boost::process::process_error& e) {
|
||||
const std::string what(e.what());
|
||||
BOOST_CHECK(what.find("RunCommandParseJSON error:") == std::string::npos);
|
||||
BOOST_CHECK(what.find(expected) != std::string::npos);
|
||||
BOOST_CHECK(std::string(e.what()).find("RunCommandParseJSON error:") == std::string::npos);
|
||||
BOOST_CHECK_EQUAL(e.code().value(), 2);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue