diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-29 20:29:50 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-29 20:29:50 +0100 |
| commit | 3e7902f7d790a486d3d9cb978df193f07f3a6ad9 (patch) | |
| tree | fd9815cf214daeec1cad826e040cf8a0cbb6be33 /nihil.posix/test.spawn.cc | |
| parent | 67b2fae1fa8b033045a44c1355d9dfd8f83e0d9b (diff) | |
| download | nihil-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.cc | 6 |
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"); |
