1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 00:03:12 +02:00

irc: use parsed command parameters in "topic" command callback

This commit is contained in:
Sébastien Helleu
2021-10-15 19:23:23 +02:00
parent 27f554659e
commit 7c1ea1cb32
2 changed files with 26 additions and 18 deletions
+6 -2
View File
@@ -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);