]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/process/test/pipe_fwd.cpp
1 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
2 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3 // Copyright (c) 2009 Boris Schaeling
4 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10 #define BOOST_TEST_MAIN
11 #define BOOST_TEST_IGNORE_SIGCHLD
12 #include <boost/test/included/unit_test.hpp>
13 #include <system_error>
15 #include <boost/asio.hpp>
16 #include <boost/algorithm/string/predicate.hpp>
18 #include <boost/process/args.hpp>
19 #include <boost/process/exe.hpp>
20 #include <boost/process/error.hpp>
21 #include <boost/process/io.hpp>
22 #include <boost/process/child.hpp>
31 namespace bp
= boost::process
;
33 BOOST_AUTO_TEST_CASE(sync_io
, *boost::unit_test::timeout(5))
35 using boost::unit_test::framework::master_test_suite
;
45 master_test_suite().argv
[1],
46 bp::args
={"test", "--prefix-once", "dear "},
54 master_test_suite().argv
[1],
55 bp::args
={"test", "--prefix-once", "hello "},
62 os
<< "boost-user!" << std::endl
;
68 std::string cmp
= "hello dear boost-user!";
72 BOOST_CHECK_EQUAL_COLLECTIONS(s
.cbegin(), s
.cend(),cmp
.cbegin(), cmp
.cend());