summaryrefslogtreecommitdiff
path: root/tests/unit/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-05-27 09:32:52 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-05-27 16:48:56 +0200
commit0babf5db23f6b74b3a94703ed319cc41576ce23b (patch)
treeab42f3566e9140fddde5eec4cc44fda1c2b29171 /tests/unit/plugins
parent93d447ffc77d8b10e9aa677720ac15ef549b2666 (diff)
downloadweechat-0babf5db23f6b74b3a94703ed319cc41576ce23b.zip
irc: display STATUSMSG actions differently from standard actions on channels (closes #1577, issue #139)
Diffstat (limited to 'tests/unit/plugins')
-rw-r--r--tests/unit/plugins/irc/test-irc-protocol.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp
index 955a2a841..e681fb2a6 100644
--- a/tests/unit/plugins/irc/test-irc-protocol.cpp
+++ b/tests/unit/plugins/irc/test-irc-protocol.cpp
@@ -597,7 +597,8 @@ TEST_GROUP(IrcProtocolWithServer)
};
/*
- * Tests send of messages to channel and nick, without cap echo-message:
+ * Tests send of messages to channel (STATUSMSG and normal) and nick,
+ * without capability "echo-message" enabled:
* - message (text)
* - notice (/notice)
* - action (/me + /ctcp)
@@ -629,6 +630,12 @@ TEST(IrcProtocolWithServer, SendMessagesWithoutEchoMessage)
"irc_privmsg,self_msg,notify_none,no_highlight,prefix_nick_white,"
"nick_alice,log1");
+ /* STATUSMSG message to channel (with /msg @<channel>) */
+ server_input_data (buffer_server, "/msg @#test msg chan ops");
+ CHECK_SENT("PRIVMSG @#test :msg chan ops");
+ CHECK_CHAN("--", "Msg(alice) -> @#test: msg chan ops",
+ "irc_privmsg,self_msg,notify_none,no_highlight,nick_alice,log1");
+
/* message to a nick (text in private buffer) */
server_input_data (buffer_pv, "msg pv 1");
CHECK_SENT("PRIVMSG bob :msg pv 1");
@@ -649,6 +656,12 @@ TEST(IrcProtocolWithServer, SendMessagesWithoutEchoMessage)
CHECK_CHAN("--", "Notice(alice) -> #test: notice chan",
"irc_notice,self_msg,notify_none,no_highlight,nick_alice,log1");
+ /* STATUSMSG notice to channel */
+ server_input_data (buffer_server, "/notice @#test notice chan ops");
+ CHECK_SENT("NOTICE @#test :notice chan ops");
+ CHECK_CHAN("--", "Notice(alice) -> @#test: notice chan ops",
+ "irc_notice,self_msg,notify_none,no_highlight,nick_alice,log1");
+
/* notice to a nick */
server_input_data (buffer_server, "/notice bob notice pv");
CHECK_SENT("NOTICE bob :notice pv");
@@ -662,13 +675,20 @@ TEST(IrcProtocolWithServer, SendMessagesWithoutEchoMessage)
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
- /* action on channel (with /ctcp) */
- server_input_data (buffer_server, "/ctcp #test ACTION action chan 2");
+ /* action on channel (with /ctcp <channel> action) */
+ server_input_data (buffer_server, "/ctcp #test action action chan 2");
CHECK_SENT("PRIVMSG #test :\01ACTION action chan 2\01");
CHECK_CHAN(" *", "alice action chan 2",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
+ /* STATUSMSG action on channel (with /ctcp @<channel> action) */
+ server_input_data (buffer_server, "/ctcp @#test action action chan ops");
+ CHECK_SENT("PRIVMSG @#test :\01ACTION action chan ops\01");
+ CHECK_CHAN("--", "Action -> @#test: alice action chan ops",
+ "irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
+ "nick_alice,log1");
+
/* action in private (with /me) */
server_input_data (buffer_pv, "/me action pv 1");
CHECK_SENT("PRIVMSG bob :\01ACTION action pv 1\01");
@@ -709,7 +729,8 @@ TEST(IrcProtocolWithServer, SendMessagesWithoutEchoMessage)
}
/*
- * Tests send of messages to channel and nick, with cap echo-message:
+ * Tests send of messages to channel (STATUSMSG and normal) and nick,
+ * with capability "echo-message" enabled:
* - message (text)
* - notice (/notice)
* - action (/me + /ctcp)