[gmime] Fixed the unit tests



commit 55310fdb0f1a85ac19cccdd71ccc29023b86ccd2
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Thu Mar 16 07:53:19 2017 -0400

    Fixed the unit tests

 gmime/gmime-object.c |    4 ++++
 tests/test-headers.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gmime/gmime-object.c b/gmime/gmime-object.c
index 2d6a77d..168c7b4 100644
--- a/gmime/gmime-object.c
+++ b/gmime/gmime-object.c
@@ -26,6 +26,7 @@
 #include <ctype.h>
 #include <string.h>
 
+#include "gmime-table-private.h"
 #include "gmime-common.h"
 #include "gmime-object.h"
 #include "gmime-stream-mem.h"
@@ -354,6 +355,9 @@ unfold_raw_value (const char *raw_value)
        register const char *inptr = raw_value;
        register char *outptr = value;
        
+       while (is_lwsp (*inptr))
+               inptr++;
+       
        while (*inptr) {
                if (*inptr == '\n') {
                        inptr++;
diff --git a/tests/test-headers.c b/tests/test-headers.c
index b566619..aa1ce45 100644
--- a/tests/test-headers.c
+++ b/tests/test-headers.c
@@ -250,7 +250,7 @@ test_header_sync (void)
                        throw (exception_new ("initial content-type header was unexpectedly null"));
                
                if (strcmp ("application/octet-stream", value) != 0)
-                       throw (exception_new ("initial content-type header had unexpected value"));
+                       throw (exception_new ("initial content-type header had unexpected value: %s", value));
                
                /* now change the content-type's media type... */
                type = g_mime_object_get_content_type (object);
@@ -304,7 +304,7 @@ test_header_sync (void)
                        throw (exception_new ("initial content-disposition header was unexpectedly null"));
                
                if (strcmp ("attachment", value) != 0)
-                       throw (exception_new ("initial content-disposition header had unexpected value"));
+                       throw (exception_new ("initial content-disposition header had unexpected value: %s", 
value));
                
                /* now change the content-disposition's disposition */
                disposition = g_mime_object_get_content_disposition (object);


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