]> git.localhorst.tv Git - blank.git/blobdiff - tst/app/ProcessTest.cpp
allow individual closing of process streams
[blank.git] / tst / app / ProcessTest.cpp
index 778b7f6d63e5d486725e821dcf37c5a4ba4a4268..a5d2cc5bad573478534e8daccaf193a88f3d3988 100644 (file)
@@ -21,7 +21,7 @@ void ProcessTest::tearDown() {
 
 void ProcessTest::testExit() {
 #ifdef __WIN32
-#  error "TODO: implemente Process tests for windows"
+#  error "TODO: implement Process tests for windows"
 #else
 
        {
@@ -95,6 +95,8 @@ void ProcessTest::testStream() {
                CPPUNIT_ASSERT_EQUAL_MESSAGE(
                        "unexpected length of input to cat",
                        test_input.size(), len);
+               // close input stream so cat knows we're done
+               proc.CloseIn();
 
                char buffer[expected_output.length() + 1];
                len = proc.ReadOut(buffer, sizeof(buffer));