| 22 | } |
| 23 | |
| 24 | void test_ret_code_comm() |
| 25 | { |
| 26 | using namespace sp; |
| 27 | auto cat = Popen({"cat", "../subprocess.hpp"}, output{PIPE}); |
| 28 | auto grep = Popen({"grep", "template"}, input{cat.output()}, output{PIPE}); |
| 29 | auto cut = Popen({"cut", "-d,", "-f", "1"}, input{grep.output()}, output{PIPE}); |
| 30 | auto res = cut.communicate().first; |
| 31 | std::cout << res.buf.data() << std::endl; |
| 32 | |
| 33 | std::cout << "retcode: " << cut.retcode() << std::endl; |
| 34 | } |
| 35 | |
| 36 | void test_ret_code_check_output() |
| 37 | { |
no test coverage detected