aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test2.c
diff options
context:
space:
mode:
authorBertrand Guiheneuf <bertrand@src.gnome.org>1999-05-28 05:37:01 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-05-28 05:37:01 +0800
commit69912fc470a36f52887f18cf8c633f34aaa34fb5 (patch)
tree2d464ffaccbd71aad35d80871b76edc383f368db /tests/test2.c
parenta8a38c7a8076ca0f7976b01fe2cbd6e1e27a089b (diff)
downloadgsoc2013-evolution-69912fc470a36f52887f18cf8c633f34aaa34fb5.tar
gsoc2013-evolution-69912fc470a36f52887f18cf8c633f34aaa34fb5.tar.gz
gsoc2013-evolution-69912fc470a36f52887f18cf8c633f34aaa34fb5.tar.bz2
gsoc2013-evolution-69912fc470a36f52887f18cf8c633f34aaa34fb5.tar.lz
gsoc2013-evolution-69912fc470a36f52887f18cf8c633f34aaa34fb5.tar.xz
gsoc2013-evolution-69912fc470a36f52887f18cf8c633f34aaa34fb5.tar.zst
gsoc2013-evolution-69912fc470a36f52887f18cf8c633f34aaa34fb5.zip
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
Diffstat (limited to 'tests/test2.c')
-rw-r--r--tests/test2.c12
1 files changed, 11 insertions, 1 deletions
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);
+
}