+void ProcessTest::testTimeout() {
+#ifdef __WIN32
+# error "TODO: implement Process tests for windows"
+#else
+ Process proc("/usr/bin/env", { "env", "cat" });
+ char buffer;
+ CPPUNIT_ASSERT_THROW_MESSAGE(
+ "read timeout on child process' stdout should throw",
+ proc.ReadOut(&buffer, 1, 1), std::runtime_error);
+ CPPUNIT_ASSERT_THROW_MESSAGE(
+ "read timeout on child process' stderr should throw",
+ proc.ReadErr(&buffer, 1, 1), std::runtime_error);
+ proc.Terminate();
+#endif
+}
+