Changeset 140
- Timestamp:
- 03/07/06 23:53:06
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/Makefile.am (modified) (1 diff)
- trunk/configure.ac (modified) (4 diffs)
- trunk/libtinymail-test/Makefile.am (modified) (3 diffs)
- trunk/libtinymail-test/tny-stream-iface-test.c (modified) (4 diffs)
- trunk/libtinymail-test/tny-test-stream.c (modified) (5 diffs)
- trunk/libtinymail-test/tny-test-stream.h (modified) (1 diff)
- trunk/libtinymail-test/tny-test-suite.c (modified) (2 diffs)
- trunk/libtinymail-test/tny-test-suite.h (modified) (1 diff)
- trunk/m4 (added)
- trunk/m4/.cvsignore (added)
- trunk/m4/gtk-doc.m4 (added)
- trunk/m4/intltool.m4 (added)
- trunk/m4/python.m4 (added)
- trunk/tinymail-python (added)
- trunk/tinymail-python/Makefile.am (added)
- trunk/tinymail-python/tinymail.defs (added)
- trunk/tinymail-python/tinymail.override (added)
- trunk/tinymail-python/tinymail_camel.defs (added)
- trunk/tinymail-python/tinymail_camel.override (added)
- trunk/tinymail-python/tinymail_camelmodule.c (added)
- trunk/tinymail-python/tinymailmodule.c (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r1 r140 1 03-07-2006 Raphael Slinckx <raphael@slinckx.net> 2 3 * Added initial Python bindings 4 1 5 01-17-2006 Philip Van Hoof <pvanhoof@gnome.org> 2 6 trunk/Makefile.am
r130 r140 1 SUBDIRS = libtinymail libtinymail-camel libtinymailui libtinymail-gnomevfs libtinymailui-gtk tinymail libtinymail-testdocs1 SUBDIRS = libtinymail libtinymail-camel libtinymailui libtinymail-gnomevfs libtinymailui-gtk tinymail tinymail-python docs trunk/configure.ac
r130 r140 2 2 AC_CONFIG_SRCDIR(tinymail/tny-main.c) 3 3 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) 4 AC_CONFIG_MACRO_DIR([m4]) 5 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4") 4 6 5 7 AM_CONFIG_HEADER(tinymail/config.h) 6 AM_CONFIG_HEADER(libtinymail-test/config.h)7 8 AM_CONFIG_HEADER(libtinymail/config.h) 8 9 AM_CONFIG_HEADER(libtinymail-camel/config.h) … … 43 44 AC_SUBST(LIBTINYMAIL_GNOMEVFS_LIBS) 44 45 45 PKG_CHECK_MODULES(LIBTINYMAIL_TEST, gunit gtk+-2.0 glib-2.0 >= 2.8 gobject-2.0 camel-1.2 camel-provider-1.2 gnome-vfs-2.0)46 AC_SUBST(LIBTINYMAIL_TEST_CFLAGS)47 AC_SUBST(LIBTINYMAIL_TEST_LIBS)48 49 46 dnl gnomeui-2 is for gnome_icon_lookup :-\ 50 47 PKG_CHECK_MODULES(LIBTINYMAILUI_GTK, glib-2.0 >= 2.8 gobject-2.0 libgnomeui-2.0 gtk+-2.0) … … 57 54 AC_SUBST(TINYMAIL_LIBS) 58 55 56 AM_PATH_PYTHON(2.3) 57 AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) 58 AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no) 59 if test "x$PYGTK_CODEGEN" = xno; then 60 AC_MSG_ERROR(could not find pygtk-codegen-2.0 script) 61 fi 62 AC_MSG_CHECKING(for pygtk defs) 63 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` 64 AC_SUBST(PYGTK_DEFSDIR) 65 AC_MSG_RESULT($PYGTK_DEFSDIR) 66 67 PKG_CHECK_MODULES(TINYMAIL_PYTHON, pygobject-2.0 pygtk-2.0 gnome-vfs-2.0) 68 AC_SUBST(TINYMAIL_PYTHON_CFLAGS) 69 AC_SUBST(TINYMAIL_PYTHON_LIBS) 70 59 71 60 72 BINDIR=$prefix/bin … … 77 89 libtinymail-gnomevfs/libtinymail-gnomevfs.pc 78 90 tinymail/Makefile 79 libtinymail-test/Makefile91 tinymail-python/Makefile 80 92 ]) 81 93 trunk/libtinymail-test/Makefile.am
r139 r140 9 9 10 10 lib_LTLIBRARIES = libtinymail-test-suite.la 11 12 bin_PROGRAMS = tny-simple-test-runner 11 13 12 14 libtinymail_test_suite_la_SOURCES = \ … … 22 24 libtinymail_test_suite_la_LDFLAGS = $(LIBTINYMAIL_TEST_LIBS) 23 25 26 tny_simple_test_runner_SOURCES = tny-simple-test-runner.c 27 28 24 29 libtinymail_test_suite_la_LIBADD = \ 25 30 $(top_builddir)/libtinymail/libtinymail-$(API_VERSION).la \ … … 28 33 $(top_builddir)/libtinymail-camel/libtinymail-camel-$(API_VERSION).la 29 34 35 tny_simple_test_runner_LDADD = \ 36 $(LIBTINYMAIL_TEST_LIBS) \ 37 $(top_builddir)/libtinymail/libtinymail-$(API_VERSION).la \ 38 $(top_builddir)/libtinymailui/libtinymailui-$(API_VERSION).la \ 39 $(top_builddir)/libtinymailui-gtk/libtinymailui-gtk-$(API_VERSION).la \ 40 $(top_builddir)/libtinymail-camel/libtinymail-camel-$(API_VERSION).la \ 41 libtinymail-test-suite.la 42 trunk/libtinymail-test/tny-stream-iface-test.c
r139 r140 23 23 /* We are going to test the camel implementation */ 24 24 #include <tny-stream-camel.h> 25 #include <camel/camel-stream-mem.h> 26 #include <camel/camel-data-wrapper.h> 25 27 26 static TnyStreamIface *iface = NULL ;28 static TnyStreamIface *iface = NULL, *source = NULL; 27 29 28 30 static void 29 31 tny_stream_iface_test_setup (void) 30 32 { 31 //iface = TNY_STREAM_IFACE (tny_stream_camel_new ()); 33 CamelStream *stream = camel_stream_mem_new (); 34 35 iface = TNY_STREAM_IFACE (tny_stream_camel_new (stream)); 36 source = TNY_STREAM_IFACE (tny_test_stream_new ()); 32 37 33 38 return; … … 38 43 { 39 44 g_object_unref (G_OBJECT (iface)); 45 g_object_unref (G_OBJECT (source)); 40 46 41 47 return; … … 43 49 44 50 static void 45 tny_stream_iface_test_ write(void)51 tny_stream_iface_test_stream (void) 46 52 { 53 gchar *buffer = (gchar*) malloc (sizeof (gchar) * 42); 47 54 48 //gunit_fail_unless(!strcmp (str_in, str_out), "Unable to set subject!\n"); 55 tny_stream_iface_write_to_stream (source, iface); 56 57 tny_stream_iface_read (iface, buffer, 42); 58 59 gunit_fail (buffer); 49 60 } 50 61 … … 61 72 /* Add test case objects to test suite */ 62 73 gunit_test_suite_add_test_case(suite, 63 gunit_test_case_new_with_funcs("tny_stream_iface_test_ write",74 gunit_test_case_new_with_funcs("tny_stream_iface_test_stream", 64 75 tny_stream_iface_test_setup, 65 tny_stream_iface_test_ write,76 tny_stream_iface_test_stream, 66 77 tny_stream_iface_test_teardown)); 67 78 trunk/libtinymail-test/tny-test-stream.c
r139 r140 59 59 tny_test_stream_read (TnyStreamIface *self, char *buffer, size_t n) 60 60 { 61 int i = 0 , t = n/2;61 int i = 0; 62 62 63 for (i = 0; i < t; i++)63 for (i = 0; i < n; i++) 64 64 { 65 //if (i % 2 == 1) 66 65 if (i % 2 == 1) 66 buffer [i] = '2'; 67 else 68 buffer [i] = '4'; 67 69 } 70 68 71 69 72 return 0; … … 73 76 tny_test_stream_write (TnyStreamIface *self, const char *buffer, size_t n) 74 77 { 75 76 77 return -1; 78 78 return 0; 79 79 } 80 80 … … 83 83 { 84 84 return 0; 85 } 86 87 static gboolean 88 tny_test_stream_eos (TnyStreamIface *self) 89 { 90 static gint count = 0; 91 92 count++; 93 94 return (count < 42); 85 95 } 86 96 … … 125 135 klass->close_func = tny_test_stream_close; 126 136 klass->write_to_stream_func = tny_test_stream_write_to_stream; 137 klass->eos_func = tny_test_stream_eos; 127 138 128 139 return; … … 143 154 144 155 GType 145 tny_ vfs_stream_get_type (void)156 tny_test_stream_get_type (void) 146 157 { 147 158 static GType type = 0; trunk/libtinymail-test/tny-test-stream.h
r139 r140 26 26 27 27 #include <tny-test-stream.h> 28 29 #include "tny-test-suite.h" 30 28 31 29 32 G_BEGIN_DECLS trunk/libtinymail-test/tny-test-suite.c
r137 r140 23 23 24 24 #include "tny-test-suite.h" 25 25 26 #include "tny-msg-header-iface-test.h" 27 #include "tny-stream-iface-test.h" 26 28 27 29 GList* … … 31 33 32 34 suites = g_list_append (suites, create_tny_msg_header_iface_suite ()); 35 suites = g_list_append (suites, create_tny_stream_iface_suite ()); 33 36 34 37 return suites; trunk/libtinymail-test/tny-test-suite.h
r128 r140 25 25 #include <gunit.h> 26 26 27 GList* gunit_get_test_suites(); 27 28 28 29 #endif
