aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/system_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/util/system_TEST.cc')
-rw-r--r--paludis/util/system_TEST.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/paludis/util/system_TEST.cc b/paludis/util/system_TEST.cc
index 538b3b65a..16f7e8a7c 100644
--- a/paludis/util/system_TEST.cc
+++ b/paludis/util/system_TEST.cc
@@ -350,5 +350,22 @@ namespace test_cases
TEST_CHECK(! std::getline(os, line));
}
} test_input;
+
+ struct BecomeChildCommandTest : TestCase
+ {
+ BecomeChildCommandTest() : TestCase("become child") { }
+
+ void run()
+ {
+ std::stringstream os;
+ Command cmd("./system_TEST_become_child");
+ cmd
+ .with_captured_stdout_stream(&os)
+ ;
+
+ TEST_CHECK_EQUAL(123, run_command(cmd));
+ TEST_CHECK_EQUAL(os.str(), "giant space monkey");
+ }
+ } test_become_child;
}