blob: d723701d9883620d2b177fa537c048c4c9487f08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "child_process.h"
#include "gtest/gtest.h"
TEST(ChildProcessTest, BasicUsage) {
util::ChildProcess ps("/usr/bin/bc");
ps.Start();
ps.Flush();
ps.Send("1 + 1\n");
char buf[128];
ps.Receive(buf, 128);
EXPECT_STREQ("2\n", buf);
ps.Stop();
}
|