diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-12-10 22:30:12 +0100 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-12-10 22:30:12 +0100 |
commit | 429d5f88b94ff28416cbfc6420b6389fa284df97 (patch) | |
tree | fb6fdaf7731de1ef396f98b748c56f3149801c84 /tests/test_tools_4.cc |
Import RTFL 0.1.1v0.1.1
Diffstat (limited to 'tests/test_tools_4.cc')
-rw-r--r-- | tests/test_tools_4.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_tools_4.cc b/tests/test_tools_4.cc new file mode 100644 index 0000000..8727fa4 --- /dev/null +++ b/tests/test_tools_4.cc @@ -0,0 +1,19 @@ +#include "simple_sink.hh" +#include "testtools.hh" + +using namespace rtfl::tools; +using namespace rtfl::tests; + +int main (int argc, char *argv[]) +{ + int fd = + openPipe ("for i in $(seq 1 10); do echo Hello world $i; sleep 1; done"); + BlockingLinesSource source (fd); + for(int i = 0; i < 5; i++) + source.addTimeout(1 + i, 123 + i); + + SimpleSink sink; + source.setup (&sink); + + return 0; +} |