diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index 34aa242ff..d15256dc3 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -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");