[gmime] Updated test-partial to use a FILE stream



commit 70030fdb0818cce3ffd768967ec0b8adfe5dc9ee
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Sat Mar 4 18:29:39 2017 -0500

    Updated test-partial to use a FILE stream

 tests/test-partial.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/test-partial.c b/tests/test-partial.c
index a23d651..16826f3 100644
--- a/tests/test-partial.c
+++ b/tests/test-partial.c
@@ -182,7 +182,7 @@ int main (int argc, char **argv)
                        while ((dent = g_dir_read_name (dir))) {
                                path = g_build_filename (input->str, dent, NULL);
                                
-                               if (!(stream = g_mime_stream_fs_open (path, O_RDONLY, 0)))
+                               if (!(stream = g_mime_stream_file_open (path, "r")))
                                        throw (exception_new ("Failed to open `%s'", path));
                                
                                g_mime_parser_init_with_stream (parser, stream);
@@ -211,8 +211,8 @@ int main (int argc, char **argv)
                        g_mime_stream_reset (combined);
                        g_object_unref (message);
                        
-                       if (!(expected = g_mime_stream_fs_open (output->str, O_RDONLY, 0))) {
-                               expected = g_mime_stream_fs_open (output->str, O_WRONLY | O_CREAT | O_TRUNC, 
0644);
+                       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_object_unref (expected);
                                g_object_unref (combined);


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