diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-04-24 21:43:57 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-04-24 21:43:57 +0200 |
commit | 28bb33aa5a80d93afbc291a05ee8b033456e1ced (patch) | |
tree | 52c31bf1121cea18add9b3a8fc1a3a3e1cacc6fc /tests/unit/plugins | |
parent | 9f5e8efbe08fe0af4cf3ef813deb4f56f31dfef9 (diff) | |
download | weechat-28bb33aa5a80d93afbc291a05ee8b033456e1ced.zip |
irc: add message 415 (cannot send message to channel)
Diffstat (limited to 'tests/unit/plugins')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index ad83803ae..ca6bced25 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -3832,6 +3832,29 @@ TEST(IrcProtocolWithServer, 404) /* * Tests functions: + * irc_protocol_cb_415 (cannot send to channel) + */ + +TEST(IrcProtocolWithServer, 415) +{ + SRV_INIT_JOIN; + + /* not enough parameters */ + RECV(":server 415"); + CHECK_ERROR_PARAMS("415", 0, 2); + RECV(":server 415 alice"); + CHECK_ERROR_PARAMS("415", 1, 2); + + RECV(":server 415 alice #test"); + CHECK_SRV("-- #test"); + RECV(":server 415 alice #test :Cannot send message to channel (+R)"); + CHECK_CHAN("-- #test: Cannot send message to channel (+R)"); + RECV(":server 415 alice #test2 :Cannot send message to channel (+R)"); + CHECK_SRV("-- #test2: Cannot send message to channel (+R)"); +} + +/* + * Tests functions: * irc_protocol_cb_432 (erroneous nickname, not connected) */ |