6#include <bitcoin-build-config.h>
11#ifdef ENABLE_EXTERNAL_SIGNER
15#include <boost/test/unit_test.hpp>
19#ifdef ENABLE_EXTERNAL_SIGNER
41 const std::string expected{
"CreateProcess failed: "};
43 const std::string expected{
"execve failed: "};
50 const std::string
command{
"cmd.exe /c exit 1"};
52 const std::string
command{
"false"};
55 const std::string what{e.what()};
63 const std::string
command{
"cmd.exe /c \"echo err 1>&2 && exit 1\""};
65 const std::string
command{
"sh -c 'echo err 1>&2 && false'"};
67 const std::string expected{
"err"};
69 const std::string what(e.what());
71 BOOST_CHECK(what.find(expected) != std::string::npos);
78 const std::string
command{
"cmd.exe /c echo {"};
80 const std::string
command{
"echo {"};
BOOST_CHECK_EXCEPTION predicates to check the specific validation error.
const UniValue & find_value(std::string_view key) const
BOOST_FIXTURE_TEST_SUITE(cuckoocache_tests, BasicTestingSetup)
Test Suite for CuckooCache.
BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
UniValue RunCommandParseJSON(const std::string &str_command, const std::string &str_std_in)
Execute a command which returns JSON, and parse the result.
BOOST_AUTO_TEST_CASE(run_command)