diff --git a/.travis.yml b/.travis.yml index c716a55f..78c862e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,15 +11,15 @@ install: - sudo make install - cd .. - rm -rf libstrophe - - wget https://open.cryptomilk.org/attachments/download/34/cmocka-0.3.2.tar.xz - - tar -xvf cmocka-0.3.2.tar.xz - - cd cmocka-0.3.2 + - wget https://open.cryptomilk.org/attachments/download/42/cmocka-0.4.1.tar.xz + - tar -xvf cmocka-0.4.1.tar.xz + - cd cmocka-0.4.1 - mkdir build - cd build - cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug .. - make - sudo make install - cd ../.. - - rm -rf cmocka-0.3.2 + - rm -rf cmocka-0.4.1 - ./bootstrap.sh script: ./configure --disable-ruby-plugins && make && make check diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 39a7cea7..94eb40d4 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -370,12 +370,12 @@ _handle_edit(int result, const wint_t ch, char *input, int *size) return 1; // ALT-LEFT - } else if ((result == KEY_CODE_YES) && (ch == 537)) { + } else if ((result == KEY_CODE_YES) && (ch == 537 || ch == 542)) { ui_previous_win(); return 1; // ALT-RIGHT - } else if ((result == KEY_CODE_YES) && (ch == 552)) { + } else if ((result == KEY_CODE_YES) && (ch == 552 || ch == 557)) { ui_next_win(); return 1; diff --git a/tests/config/mock_accounts.c b/tests/config/mock_accounts.c index 34f8624f..6c555e0d 100644 --- a/tests/config/mock_accounts.c +++ b/tests/config/mock_accounts.c @@ -11,13 +11,13 @@ static ProfAccount * _mock_accounts_get_account(const char * const name) { check_expected(name); - return (ProfAccount *)mock(); + return mock_ptr_type(ProfAccount *); } gchar ** _mock_accounts_get_list(void) { - return (gchar **)mock(); + return mock_ptr_type(gchar **); } void diff --git a/tests/log/mock_log.c b/tests/log/mock_log.c index 4b9aeb14..d423b5bb 100644 --- a/tests/log/mock_log.c +++ b/tests/log/mock_log.c @@ -41,7 +41,7 @@ void log_msg(log_level_t level, const char * const area, const char * const msg) {} char * get_log_file_location(void) { - return (char *)mock(); + return mock_ptr_type(char *); } log_level_t log_level_from_string(char *log_level) @@ -56,7 +56,7 @@ void chat_log_close(void) {} GSList * chat_log_get_previous(const gchar * const login, const gchar * const recipient, GSList *history) { - return (GSList *)mock(); + return mock_ptr_type(GSList *); } void groupchat_log_init(void) {} diff --git a/tests/otr/mock_otr.c b/tests/otr/mock_otr.c index 3349e74c..3ccf3a13 100644 --- a/tests/otr/mock_otr.c +++ b/tests/otr/mock_otr.c @@ -24,20 +24,20 @@ _mock_otr_keygen(ProfAccount *account) static char * _mock_otr_libotr_version(void) { - return (char *)mock(); + return mock_ptr_type(char *); } static char * _mock_otr_get_my_fingerprint(void) { - return (char *)mock(); + return mock_ptr_type(char *); } static char * _mock_otr_get_their_fingerprint(const char * const recipient) { check_expected(recipient); - return (char *)mock(); + return mock_ptr_type(char *); } static gboolean @@ -49,7 +49,7 @@ _mock_otr_key_loaded(void) static char * _mock_otr_start_query(void) { - return (char *)mock(); + return mock_ptr_type(char *); } void diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index e81118e9..2cfde09a 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -73,7 +73,7 @@ void _mock_cons_show_account_list(gchar **accounts) static char * _mock_ui_ask_password(void) { - return (char *)mock(); + return mock_ptr_type(char *); } static @@ -91,7 +91,7 @@ win_type_t _mock_ui_current_win_type(void) static char * _mock_ui_current_recipeint(void) { - return (char *)mock(); + return mock_ptr_type(char *); } static diff --git a/tests/xmpp/mock_xmpp.c b/tests/xmpp/mock_xmpp.c index 7faf7170..940356ca 100644 --- a/tests/xmpp/mock_xmpp.c +++ b/tests/xmpp/mock_xmpp.c @@ -17,7 +17,7 @@ _mock_jabber_get_connection_status(void) static char * _mock_jabber_get_account_name(void) { - return (char *)mock(); + return mock_ptr_type(char *); } static void @@ -47,7 +47,7 @@ _mock_jabber_connect_with_account(const ProfAccount * const account) static char * _mock_jabber_get_presence_message(void) { - return (char *)mock(); + return mock_ptr_type(char *); } static void @@ -61,7 +61,7 @@ _mock_presence_update(resource_presence_t status, const char * const msg, int id static const GList * _mock_bookmark_get_list(void) { - return (GList *)mock(); + return mock_ptr_type(GList *); } static gboolean