1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 08:43:13 +02:00

tests: add tests on manual CTCP ACTION sent to IRC channel

This commit is contained in:
Sébastien Helleu
2023-05-29 11:13:49 +02:00
parent a4c2d7f808
commit f1a826a116
@@ -714,6 +714,20 @@ TEST(IrcProtocolWithServer, SendMessagesWithoutEchoMessage)
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* action on channel (with raw code: "\01ACTION") */
server_input_data (buffer_chan, "\01ACTION is testing\01");
CHECK_SENT("PRIVMSG #test :\01ACTION is testing\01");
CHECK_CHAN(" *", "alice is testing",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* action on channel (with raw code: "\01ACTION"), no message */
server_input_data (buffer_chan, "\01ACTION\01");
CHECK_SENT("PRIVMSG #test :\01ACTION\01");
CHECK_CHAN(" *", "alice",
"irc_privmsg,irc_action,self_msg,notify_none,no_highlight,"
"nick_alice,log1");
/* action on channel (with /action *) */
server_input_data (buffer_chan, "/action * action chan 2");
CHECK_SENT("PRIVMSG #test :\01ACTION action chan 2\01");
@@ -925,6 +939,16 @@ TEST(IrcProtocolWithServer, SendMessagesWithEchoMessage)
CHECK_SENT("PRIVMSG #test :\01ACTION\01");
CHECK_NO_MSG;
/* action on channel (with raw code: "\01ACTION") */
server_input_data (buffer_chan, "\01ACTION is testing\01");
CHECK_SENT("PRIVMSG #test :\01ACTION is testing\01");
CHECK_NO_MSG;
/* action on channel (with raw code: "\01ACTION"), no message */
server_input_data (buffer_chan, "\01ACTION\01");
CHECK_SENT("PRIVMSG #test :\01ACTION\01");
CHECK_NO_MSG;
/* action on channel (with /action *) */
server_input_data (buffer_chan, "/action * action chan 2");
CHECK_SENT("PRIVMSG #test :\01ACTION action chan 2\01");