diff options
author | bertrand <bertrand@helixcode.com> | 2000-01-17 16:40:11 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-01-17 16:40:11 +0800 |
commit | 3bdd857a4a69e83841c2fbae83d96101912ebf69 (patch) | |
tree | 96287828f9f04604e529a52b11a0f07206d04744 /tests/test9.c | |
parent | 8c55e9f58b86483aa64c75a9324cd04e3ae79b2b (diff) | |
download | gsoc2013-evolution-3bdd857a4a69e83841c2fbae83d96101912ebf69.tar gsoc2013-evolution-3bdd857a4a69e83841c2fbae83d96101912ebf69.tar.gz gsoc2013-evolution-3bdd857a4a69e83841c2fbae83d96101912ebf69.tar.bz2 gsoc2013-evolution-3bdd857a4a69e83841c2fbae83d96101912ebf69.tar.lz gsoc2013-evolution-3bdd857a4a69e83841c2fbae83d96101912ebf69.tar.xz gsoc2013-evolution-3bdd857a4a69e83841c2fbae83d96101912ebf69.tar.zst gsoc2013-evolution-3bdd857a4a69e83841c2fbae83d96101912ebf69.zip |
test for the mbox utils. (copy_file_chunk): fixed a nasty bug.
2000-01-17 bertrand <bertrand@helixcode.com>
* tests/test9.c (main): test for the mbox utils.
(copy_file_chunk): fixed a nasty bug.
(camel_mbox_write_xev): create the copy file descriptor
with the proper arguments. Exceptions implememnted.
(camel_mbox_write_xev): changed the way bytes are counted.
No more uses the message size cause it did not take into
account the message separators characters.
(camel_mbox_write_xev): hopefully fixed the last bugs.
works ok now.
Summary information / X-Evolution header generation should all
work ok now.
svn path=/trunk/; revision=1579
Diffstat (limited to 'tests/test9.c')
-rw-r--r-- | tests/test9.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/test9.c b/tests/test9.c new file mode 100644 index 0000000000..6356bad41f --- /dev/null +++ b/tests/test9.c @@ -0,0 +1,51 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + + +#include "camel-mbox-folder.h" +#include "camel-mbox-parser.h" +#include "camel-mbox-utils.h" +#include "camel.h" +#include "camel-log.h" +#include "camel-exception.h" +#include <sys/types.h> +#include <unistd.h> +#include <errno.h> +#include <string.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <glib.h> + +int +main (int argc, char**argv) +{ + GArray *message_info_array; + gint test_file_fd; + CamelException *ex; + + camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG; + + gtk_init (&argc, &argv); + camel_init (); + + ex = camel_exception_new (); + test_file_fd = open (argv[1], O_RDONLY); + message_info_array = camel_mbox_parse_file (test_file_fd, + "From ", + 0, + TRUE, + NULL, + 0, + ex); + + close (test_file_fd); + camel_mbox_write_xev (argv[1], message_info_array, 0, ex); + if (camel_exception_get_id (ex)) { + printf ("Exception caught in camel_mbox_write_xev : %s\n", camel_exception_get_description (ex)); + } + + + +} + + + |