From 69912fc470a36f52887f18cf8c633f34aaa34fb5 Mon Sep 17 00:00:00 2001 From: Bertrand Guiheneuf Date: Thu, 27 May 1999 21:37:01 +0000 Subject: rewrite message obtained via parsing into a file. Actually, it works * tests/test2.c (main): rewrite message obtained via parsing into a file. Actually, it works pretty well :)) * camel/camel-mime-message.c (_set_recipient_list_from_string): create recipient list form a comma separated string. (_parse_header_pair): added recipient lists parsing. * camel/camel-mime-part.c (_parse_header_pair): new (protected) method. Parse a head pair and decides what to do with it. (_add_header): Call in _parse_header_pair * camel/camel-mime-message.c (_parse_header_pair): overload header parsing MimePart mthod. * camel/gstring-util.c (g_string_split): new func: split a gstring into a GList of substring. svn path=/trunk/; revision=950 --- tests/test2.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/test2.c') diff --git a/tests/test2.c b/tests/test2.c index 4fa3bc59f1..dbb2b29ad0 100644 --- a/tests/test2.c +++ b/tests/test2.c @@ -29,6 +29,7 @@ void main (int argc, char**argv) { FILE *input_file; + FILE *output_file; GHashTable *header_table; CamelMimeMessage *message; @@ -36,7 +37,7 @@ main (int argc, char**argv) gtk_init (&argc, &argv); - camel_debug_level = WARNING; + camel_debug_level = FULL_DEBUG; message = camel_mime_message_new_with_session( (CamelSession *)NULL); input_file = fopen ("mail.test", "r"); @@ -51,6 +52,15 @@ main (int argc, char**argv) else printf("header is empty, no header line present\n"); fclose (input_file); + + output_file = fopen ("mail2.test", "w"); + if (!output_file) { + perror("could not open output file"); + exit(2); + } + camel_data_wrapper_write_to_file (CAMEL_DATA_WRAPPER (message), output_file); + fclose (output_file); + } -- cgit v1.2.3