[gmime] Flush some streams in the unit tests



commit 75c30390c2b1ce483b686bed9651ed3de4aaceb4
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Wed Mar 8 08:32:43 2017 -0500

    Flush some streams in the unit tests

 tests/test-mbox.c    |    1 +
 tests/test-partial.c |    1 +
 tests/test-streams.c |    4 +---
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/test-mbox.c b/tests/test-mbox.c
index 2e36f7f..7982b77 100644
--- a/tests/test-mbox.c
+++ b/tests/test-mbox.c
@@ -347,6 +347,7 @@ int main (int argc, char **argv)
                                test_parser (parser, mstream, pstream);
                                
 #ifdef ENABLE_MBOX_MATCH
+                               g_mime_stream_flush (mstream);
                                g_mime_stream_reset (istream);
                                g_mime_stream_reset (mstream);
                                if (!streams_match (istream, mstream))
diff --git a/tests/test-partial.c b/tests/test-partial.c
index 16826f3..c35efc9 100644
--- a/tests/test-partial.c
+++ b/tests/test-partial.c
@@ -214,6 +214,7 @@ int main (int argc, char **argv)
                        if (!(expected = g_mime_stream_file_open (output->str, "r"))) {
                                expected = g_mime_stream_file_open (output->str, "w");
                                g_mime_stream_write_to_stream (combined, expected);
+                               g_mime_stream_flush (expected);
                                g_object_unref (expected);
                                g_object_unref (combined);
                                
diff --git a/tests/test-streams.c b/tests/test-streams.c
index 496028e..6453b1b 100644
--- a/tests/test-streams.c
+++ b/tests/test-streams.c
@@ -129,7 +129,7 @@ test_stream_gets (GMimeStream *stream, const char *filename)
        char sbuf[100], rbuf[100];
        ssize_t slen;
        FILE *fp;
-
+       
        /* '0x1a' character is treated as EOF (Ctrl+Z) on Windows if file is opened in text mode,
         *  thus it's opened in binary mode.
         */
@@ -240,8 +240,6 @@ test_stream_mem (const char *filename)
 #endif
 
 
-
-
 static gboolean
 check_stream_fs (const char *input, const char *output, const char *filename, gint64 start, gint64 end)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]