blob: 8727fa4cdcd0f5f6f6325e07d3f5ab6762e13a53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
}
|