Created SILC Runtime Toolkit git repository Part II.
[runtime.git] / lib / silcutil / tests / test_silcmime.c
index 6ebcecd617c4b5769ee7fa5dcc276204f533af78..5cf38bd82a8f4791b15f6223f8d7b613cb68484d 100644 (file)
@@ -1,6 +1,6 @@
 /* SilcMime tests */
 
-#include "silc.h"
+#include "silcruntime.h"
 #include "silcmime.h"
 
 int main(int argc, char **argv)
@@ -19,10 +19,10 @@ int main(int argc, char **argv)
   if (argc > 1 && !strcmp(argv[1], "-d")) {
     silc_log_debug(TRUE);
     silc_log_debug_hexdump(TRUE);
-    silc_log_set_debug_string("*mime*");
+    silc_log_set_debug_string("*mime*,*errno*");
   }
 
-  /* 
+  /*
    * Simple MIME test
    */
   SILC_LOG_DEBUG(("Allocating MIME message context"));
@@ -267,6 +267,7 @@ int main(int argc, char **argv)
         SILC_LOG_DEBUG(("Error encoding"));
       SILC_LOG_DEBUG(("Encoded MIME message: \n%s", enc));
       silc_free(enc);
+      silc_mime_free(part);
     }
   }
   silc_mime_partial_free(frag);
@@ -278,5 +279,5 @@ int main(int argc, char **argv)
   SILC_LOG_DEBUG(("Testing was %s", success ? "SUCCESS" : "FAILURE"));
   fprintf(stderr, "Testing was %s\n", success ? "SUCCESS" : "FAILURE");
 
-  return success;
+  return !success;
 }