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)
5151 }
5252 {
5353 // 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
5954 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 );
6357 return true ;
6458 });
6559 }
You can’t perform that action at this time.
0 commit comments