diff options
| author | Lexi Winter <lexi@le-fay.org> | 2025-06-30 07:51:23 +0100 |
|---|---|---|
| committer | Lexi Winter <lexi@le-fay.org> | 2025-06-30 07:51:23 +0100 |
| commit | 034cd404a129103a8dd7747e6bd00ffd5550da93 (patch) | |
| tree | d27946517d4d9333abd26ac50bbd4a436093e2ce /nihil.posix/test.spawn.cc | |
| parent | 3e7902f7d790a486d3d9cb978df193f07f3a6ad9 (diff) | |
| download | nihil-034cd404a129103a8dd7747e6bd00ffd5550da93.tar.gz nihil-034cd404a129103a8dd7747e6bd00ffd5550da93.tar.bz2 | |
refactoring
Diffstat (limited to 'nihil.posix/test.spawn.cc')
| -rw-r--r-- | nihil.posix/test.spawn.cc | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/nihil.posix/test.spawn.cc b/nihil.posix/test.spawn.cc index ca6c076..c5b4f53 100644 --- a/nihil.posix/test.spawn.cc +++ b/nihil.posix/test.spawn.cc @@ -6,27 +6,6 @@ import nihil.posix; -TEST_CASE("spawn: system", "[spawn]") -{ - using namespace nihil; - - auto exec = shell("x=1; echo $x"); - REQUIRE(exec); - - auto output = std::string(); - auto capture = make_capture(stdout_fileno, output); - REQUIRE(capture); - - auto proc = spawn(*exec, *capture); - REQUIRE(proc); - - auto status = std::move(*proc).wait(); - REQUIRE(status); - - REQUIRE(status->okay()); - REQUIRE(output == "1\n"); -} - TEST_CASE("spawn: execv", "[spawn]") { using namespace nihil; @@ -69,25 +48,6 @@ TEST_CASE("spawn: execvp", "[spawn]") { REQUIRE(output == "1\n"); } -TEST_CASE("spawn: execl", "[spawn]") { - using namespace nihil; - - auto exec = execl("/bin/sh", "sh", "-c", "x=1; echo $x"); - REQUIRE(exec); - - auto output = std::string(); - auto capture = make_capture(stdout_fileno, output); - REQUIRE(capture); - - auto proc = spawn(*exec, *capture); - REQUIRE(proc); - - auto status = std::move(*proc).wait(); - REQUIRE(status); - - REQUIRE(status->okay()); - REQUIRE(output == "1\n"); -} TEST_CASE("spawn: execlp", "[spawn]") { using namespace nihil; |
