mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-12 02:07:39 +01:00
Merge bitcoin/bitcoin#26377: test: Make system_tests/run_command
test locale and platform agnostic
884304e6c6
test: Make `system_tests/run_command` locale agnostic (Hennadii Stepanov) Pull request description: Fixes bitcoin/bitcoin#26368. ACKs for top commit: Sjors: tACK884304e6c6
Tree-SHA512: 76d4941e02b3b119dcf4dacbe60ef45a9dc8cf775bdb31b5291cd8147665285d41caaf1f5688abdfc9a47c393ddb535af7b11af839660d30ef30f1ca0d936133
This commit is contained in:
commit
1bad29fe02
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
|
// 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) {
|
BOOST_CHECK_EXCEPTION(RunCommandParseJSON("invalid_command"), boost::process::process_error, [&](const boost::process::process_error& e) {
|
||||||
const std::string what(e.what());
|
BOOST_CHECK(std::string(e.what()).find("RunCommandParseJSON error:") == std::string::npos);
|
||||||
BOOST_CHECK(what.find("RunCommandParseJSON error:") == std::string::npos);
|
BOOST_CHECK_EQUAL(e.code().value(), 2);
|
||||||
BOOST_CHECK(what.find(expected) != std::string::npos);
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue