aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test2.c')
-rw-r--r--tests/test2.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/test2.c b/tests/test2.c
new file mode 100644
index 0000000000..be72e8f8a6
--- /dev/null
+++ b/tests/test2.c
@@ -0,0 +1,36 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* tests mime message file parsing */
+#include "gmime-utils.h"
+#include "stdio.h"
+
+void print_header_line (gpointer data, gpointer user_data)
+{
+ GString *header_line = (GString *)data;
+ printf("\n--------- New Header ----------\n");
+ if ((header_line) && (header_line->str))
+ printf("%s\n", header_line->str);
+ printf("--------- End -----------------\n");
+}
+
+void
+main (int argc, char**argv)
+{
+ FILE *input_file;
+ GList *header_lines;
+
+
+ gtk_init (&argc, &argv);
+
+ input_file = fopen ("mail.test", "r");
+ if (!input_file) {
+ perror("could not open input file");
+ exit(2);
+ }
+
+ header_lines = get_header_lines_from_file (input_file);
+ if (header_lines) g_list_foreach (header_lines, print_header_line, NULL);
+ else printf("header is empty, no header line present\n");
+ fclose (input_file);
+
+
+}
d>- Update to 1.5.5pav2006-01-152-4/+4 * - Update to 1.5.4tdb2006-01-113-6/+5 * Chase libversion bumb to libMagick.so.9edwin2006-01-051-0/+1 * www/mediawiki update to 1.5.3 (security update)edwin2005-12-212-3/+4 * Chase some URLs per the distfile survey.linimon2005-11-251-1/+1 * - Update to 1.5.2garga2005-11-092-11/+5 * - Update to 1.5.1garga2005-10-282-3/+3 * - Update to 1.5.0garga2005-10-132-4/+4 * - Update to 1.4.11garga2005-10-102-4/+4 * - Update to 1.4.10garga2005-09-232-3/+3 * Update to 1.4.9jylefort2005-09-012-3/+3 * Update to 1.4.7.novel2005-07-222-3/+3 * - Update to 1.4.6, which fixes Javascript injection vulnerabilitypav2005-07-082-4/+3 * - Fix typo (LASTEST_LINK -> LATEST_LINK).flz2005-06-071-1/+2 * - Security update to 1.4.5.flz2005-06-062-3/+4 * - Do not use NO_LATEST_LINK [1]jylefort2005-05-141-2/+1 * Update to 1.4.4novel2005-05-072-4/+25 * - Update to 1.4.0pav2005-05-062-25/+6 * Update to 1.3.12novel2005-05-022-5/+25 * - Add missing php dependencies (session and zlib).flz2005-03-041-1/+2 * - Update to 1.3.11.flz2005-03-022-3/+3