From: Sebastian B. <sb...@us...> - 2013-12-24 09:29:46
|
Update of /cvsroot/simplemail/simplemail/tests In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv846/tests Modified Files: imap2_unittest.c Log Message: Switch to the INBOX folder in the timer callback. This should download all available mails within the folder. Index: imap2_unittest.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/tests/imap2_unittest.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- imap2_unittest.c 24 Dec 2013 09:29:26 -0000 1.16 +++ imap2_unittest.c 24 Dec 2013 09:29:44 -0000 1.17 @@ -25,7 +25,10 @@ #include "account.h" #include "configuration.h" +#include "debug.h" #include "folder.h" +#include "mail.h" +#include "simplemail.h" #include "support_indep.h" /*************************************************************/ @@ -104,7 +107,31 @@ void *test_imap_timer_callback(void *data) { - thread_abort(thread_get_main()); + static enum + { + SWITCH_TO_INBOX, + QUIT + } state; + + SM_DEBUGF(20,("state = %d\n", state)); + switch (state) + { + case SWITCH_TO_INBOX: + { + struct folder *f; + + f = folder_find_by_imap("test","localhost","INBOX"); + CU_ASSERT(f != NULL); + + imap_thread_connect(f); + } + state = QUIT; + break; + + case QUIT: + thread_abort(thread_get_main()); + break; + } return NULL; } |