diff options
Diffstat (limited to 'lib/subunit/c/tests')
-rw-r--r-- | lib/subunit/c/tests/test_child.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/subunit/c/tests/test_child.c b/lib/subunit/c/tests/test_child.c index 0744599b9f..1318322ab2 100644 --- a/lib/subunit/c/tests/test_child.c +++ b/lib/subunit/c/tests/test_child.c @@ -16,6 +16,7 @@ **/ #include <stdlib.h> +#include <stdio.h> #include <unistd.h> #include <string.h> #include <check.h> @@ -57,6 +58,8 @@ test_stdout_function(char const * expected, * DEAL. */ function(); + /* flush writes on FILE object to file descriptor */ + fflush(stdout); /* restore stdout now */ if (dup2(old_stdout, 1) != 1) { close(old_stdout); |