From 00999694f9ce98ad7ef54b66c9e82186edcf55a6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 18 Oct 2020 23:59:02 +0300 Subject: Process: add runas() --- test/unit_tests/process.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/unit_tests') diff --git a/test/unit_tests/process.cpp b/test/unit_tests/process.cpp index a126f86..715364f 100644 --- a/test/unit_tests/process.cpp +++ b/test/unit_tests/process.cpp @@ -82,4 +82,11 @@ BOOST_FIXTURE_TEST_CASE(echo_stdin_from_file, WithEchoExe) { BOOST_TEST(stdout8 == stdin8); } +BOOST_FIXTURE_TEST_CASE(echo_runas, WithEchoExe) { + const CommandLine cmd_line{get_echo_exe(), {"foo", "bar"}}; + const auto process = Process::runas(cmd_line); + process.wait(); + BOOST_TEST(process.get_exit_code() == 0); +} + BOOST_AUTO_TEST_SUITE_END() -- cgit v1.2.3