[gmime: 7/8] Fixed test-partial.c to load the path passed on cmd-line



commit 3d524b43b81effeb09da6951eb1129f602a8d687
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sat Apr 8 12:55:47 2017 -0400

    Fixed test-partial.c to load the path passed on cmd-line

 tests/test-partial.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-partial.c b/tests/test-partial.c
index c1947d8..bca3472 100644
--- a/tests/test-partial.c
+++ b/tests/test-partial.c
@@ -154,11 +154,19 @@ int main (int argc, char **argv)
        
        format = g_mime_format_options_get_default ();
        
-       output = g_string_new (datadir);
+       path = datadir;
+       for (i = 1; i < argc; i++) {
+               if (argv[i][0] != '-') {
+                       path = argv[i];
+                       break;
+               }
+       }
+       
+       output = g_string_new (path);
        g_string_append_c (output, G_DIR_SEPARATOR);
        g_string_append (output, "output");
        
-       input = g_string_new (datadir);
+       input = g_string_new (path);
        g_string_append_c (input, G_DIR_SEPARATOR);
        g_string_append (input, "input");
        


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