test: Stricter unit test

Now that the previous commit fixed a unit test bug, make the test
stricter, to prevent this issue from happening again in the future.
This commit is contained in:
MarcoFalke
2026-01-20 11:34:15 +01:00
parent fa626bd143
commit fa48d42163

View File

@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(run_command)
const std::string expected{"err"};
BOOST_CHECK_EXCEPTION(RunCommandParseJSON(command), std::runtime_error, [&](const std::runtime_error& e) {
const std::string what(e.what());
BOOST_CHECK(what.find(strprintf("RunCommandParseJSON error: process(%s) returned", util::Join(command, " "))) != std::string::npos);
BOOST_CHECK(what.find(strprintf("RunCommandParseJSON error: process(%s) returned %s: %s", util::Join(command, " "), 1, "err")) != std::string::npos);
BOOST_CHECK(what.find(expected) != std::string::npos);
return true;
});