diff options
Diffstat (limited to 'src/autoplay/child_process_test.cc')
| -rw-r--r-- | src/autoplay/child_process_test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/autoplay/child_process_test.cc b/src/autoplay/child_process_test.cc new file mode 100644 index 0000000..d723701 --- /dev/null +++ b/src/autoplay/child_process_test.cc @@ -0,0 +1,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(); +} |
