diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-15 19:23:23 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-17 21:28:31 +0200 |
commit | 7c1ea1cb326d78793f5198496386ee977ec5070c (patch) | |
tree | c7c1ea2cf1074fd22ea3b15c119af12e57ca7d0a /tests/unit/plugins/irc/test-irc-protocol.cpp | |
parent | 27f554659e5889790e9dc5edc0311d2ed234472e (diff) | |
download | weechat-7c1ea1cb326d78793f5198496386ee977ec5070c.zip |
irc: use parsed command parameters in "topic" command callback
Diffstat (limited to 'tests/unit/plugins/irc/test-irc-protocol.cpp')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index 89acce28d..c329f9dbe 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -1881,9 +1881,13 @@ TEST(IrcProtocolWithServer, topic) ptr_channel = ptr_server->channels; POINTERS_EQUAL(NULL, ptr_channel->topic); - /* not enough arguments */ + /* not enough parameters */ RECV(":alice!user@host TOPIC"); - CHECK_ERROR_ARGS("topic", 2, 3); + CHECK_ERROR_PARAMS("topic", 0, 1); + + /* missing nick */ + RECV("TOPIC #test :new topic"); + CHECK_ERROR_NICK("topic"); POINTERS_EQUAL(NULL, ptr_channel->topic); |