From 7c1ea1cb326d78793f5198496386ee977ec5070c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 15 Oct 2021 19:23:23 +0200 Subject: irc: use parsed command parameters in "topic" command callback --- tests/unit/plugins/irc/test-irc-protocol.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/unit') 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); -- cgit v1.2.3