summaryrefslogtreecommitdiff
path: root/tests/test_tools_4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_tools_4.cc')
-rw-r--r--tests/test_tools_4.cc19
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;
+}