Mercurial > dovecot > core-2.2
changeset 21939:db452e6278f5
lib-imap-client: Fixes to unit test
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 10 Apr 2017 18:12:47 +0300 |
parents | 47e307692af2 |
children | 63b1d742208e |
files | src/lib-imap-client/test-imapc-client.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-imap-client/test-imapc-client.c Mon Apr 10 17:10:21 2017 +0300 +++ b/src/lib-imap-client/test-imapc-client.c Mon Apr 10 18:12:47 2017 +0300 @@ -143,7 +143,8 @@ i_debug("server: PID=%s", my_pid); /* child: server */ ioloop = io_loop_create(); - server_test(); + if (server_test != NULL) + server_test(); test_server_disconnect(&server); io_loop_destroy(&ioloop); /* wait for it to be killed; this way, valgrind will not @@ -371,7 +372,7 @@ test_assert(test_imapc_server_expect("3 NOOP")); o_stream_nsend_str(server.output, "3 OK \r\n"); - test_assert(test_imapc_server_expect("4 LOGOUT")); + test_assert(i_stream_read_next_line(server.input) == NULL); } static void test_imapc_reconnect(void) @@ -435,7 +436,7 @@ test_assert(test_imapc_server_expect("3 RETRY2")); o_stream_nsend_str(server.output, "3 OK \r\n"); - test_assert(test_imapc_server_expect("4 LOGOUT")); + test_assert(i_stream_read_next_line(server.input) == NULL); } static void test_imapc_reconnect_resend_commands(void) @@ -565,9 +566,8 @@ o_stream_nsend_str(server.output, "6 OK \r\n"); test_assert(test_imapc_server_expect("3 RETRY")); o_stream_nsend_str(server.output, "3 OK \r\n"); - i_info("retry"); - test_assert(test_imapc_server_expect("4 LOGOUT")); + test_assert(i_stream_read_next_line(server.input) == NULL); } static void test_imapc_reconnect_mailbox(void)