Skip to content

Commit

Permalink
fixes the exit-code error on osx builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Nov 18, 2024
1 parent 9925e82 commit fa83c2f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/v1/exit_code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,17 @@ BOOST_AUTO_TEST_CASE(async_nowait, *boost::unit_test::timeout(10))
boost::asio::io_context io_context;
bp::child c(
master_test_suite().argv[1],
"test", "--exit-code", "221",
"test", "--exit-code", "121",
ec,
bp::on_exit=[](int exit_code, std::error_code) mutable {},
io_context
);
BOOST_REQUIRE(!ec);
io_context.run_for(std::chrono::milliseconds(100));
BOOST_CHECK_EQUAL(221, c.exit_code());
while (c.running())
{
io_context.run_for(std::chrono::milliseconds(10));
io_context.restart();
}

BOOST_CHECK_EQUAL(121, c.exit_code());
}

0 comments on commit fa83c2f

Please sign in to comment.