From 035c190e1cd5a46277271903ed8b0d0e670c63fc Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 28 Jan 2017 19:48:51 +0000 Subject: [PATCH] Update test plugins --- tests/python-test.py | 3 +++ tests/test-c-plugin/test-c-plugin.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/python-test.py b/tests/python-test.py index 29c16ad..235db06 100644 --- a/tests/python-test.py +++ b/tests/python-test.py @@ -587,6 +587,7 @@ def prof_post_chat_message_display(barejid, resource, message): def prof_pre_chat_message_send(barejid, message): prof.win_create(plugin_win, _handle_win_input) prof.win_show(plugin_win, "fired -> prof_pre_chat_message_send: " + barejid + ", " + message) + return message def prof_post_chat_message_send(barejid, message): @@ -607,6 +608,7 @@ def prof_post_room_message_display(barejid, nick, message): def prof_pre_room_message_send(barejid, message): prof.win_create(plugin_win, _handle_win_input) prof.win_show(plugin_win, "fired -> prof_pre_room_message_send: " + barejid + ", " + message) + return message def prof_post_room_message_send(barejid, message): @@ -635,6 +637,7 @@ def prof_post_priv_message_display(barejid, nick, message): def prof_pre_priv_message_send(barejid, nick, message): prof.win_create(plugin_win, _handle_win_input) prof.win_show(plugin_win, "fired -> prof_pre_priv_message_send: " + barejid + ", " + nick + ", " + message) + return message def prof_post_priv_message_send(barejid, nick, message): diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index 23fb6ad..ef9236f 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -791,7 +791,7 @@ prof_pre_chat_message_send(const char * const barejid, const char *message) sprintf(buf, "%s%s, %s", str, barejid, message); prof_win_show(plugin_win, buf); - return NULL; + return strdup(message); } void @@ -839,7 +839,7 @@ prof_pre_room_message_send(const char * const barejid, const char *message) sprintf(buf, "%s%s, %s", str, barejid, message); prof_win_show(plugin_win, buf); - return NULL; + return strdup(message); } void @@ -904,7 +904,7 @@ prof_pre_priv_message_send(const char * const barejid, const char * const nick, sprintf(buf, "%s%s, %s, %s", str, barejid, nick, message); prof_win_show(plugin_win, buf); - return NULL; + return strdup(message); } void