File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,9 @@ BOOST_AUTO_TEST_CASE(run_command)
51
51
}
52
52
{
53
53
// An invalid command is handled by Boost
54
- #ifdef WIN32
55
- const std::string expected{" The system cannot find the file specified." };
56
- #else
57
- const std::string expected{" No such file or directory" };
58
- #endif
59
54
BOOST_CHECK_EXCEPTION (RunCommandParseJSON (" invalid_command" ), boost::process::process_error, [&](const boost::process::process_error& e) {
60
- const std::string what (e.what ());
61
- BOOST_CHECK (what.find (" RunCommandParseJSON error:" ) == std::string::npos);
62
- BOOST_CHECK (what.find (expected) != std::string::npos);
55
+ BOOST_CHECK (std::string (e.what ()).find (" RunCommandParseJSON error:" ) == std::string::npos);
56
+ BOOST_CHECK_EQUAL (e.code ().value (), 2 );
63
57
return true ;
64
58
});
65
59
}
You can’t perform that action at this time.
0 commit comments