aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-18 23:59:02 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-19 00:00:12 +0300
commit00999694f9ce98ad7ef54b66c9e82186edcf55a6 (patch)
tree8108af41c8091417d05db62b7ae9242c68b9c703 /test
parentstream.hpp -> process_io.hpp, move IO there (diff)
downloadwinapi-common-00999694f9ce98ad7ef54b66c9e82186edcf55a6.tar.gz
winapi-common-00999694f9ce98ad7ef54b66c9e82186edcf55a6.zip
Process: add runas()
Diffstat (limited to '')
-rw-r--r--test/unit_tests/process.cpp7
1 files changed, 7 insertions, 0 deletions
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()