aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/test.spawn.cc
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-29 20:29:50 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-29 20:29:50 +0100
commit3e7902f7d790a486d3d9cb978df193f07f3a6ad9 (patch)
treefd9815cf214daeec1cad826e040cf8a0cbb6be33 /nihil.posix/test.spawn.cc
parent67b2fae1fa8b033045a44c1355d9dfd8f83e0d9b (diff)
downloadnihil-3e7902f7d790a486d3d9cb978df193f07f3a6ad9.tar.gz
nihil-3e7902f7d790a486d3d9cb978df193f07f3a6ad9.tar.bz2
finish macOS support
Diffstat (limited to 'nihil.posix/test.spawn.cc')
-rw-r--r--nihil.posix/test.spawn.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/nihil.posix/test.spawn.cc b/nihil.posix/test.spawn.cc
index da321ff..ca6c076 100644
--- a/nihil.posix/test.spawn.cc
+++ b/nihil.posix/test.spawn.cc
@@ -32,17 +32,17 @@ TEST_CASE("spawn: execv", "[spawn]") {
auto args = argv({"sh", "-c", "x=1; echo $x"});
auto exec = execv("/bin/sh", std::move(args));
- REQUIRE(exec);
auto output = std::string();
auto capture = make_capture(stdout_fileno, output);
REQUIRE(capture);
- auto proc = spawn(*exec, *capture);
+ auto proc = spawn(exec, *capture);
REQUIRE(proc);
auto status = std::move(*proc).wait();
- REQUIRE(status);
+ if (!status)
+ FAIL(to_string(status.error()));
REQUIRE(status->okay());
REQUIRE(output == "1\n");