summaryrefslogtreecommitdiff
path: root/tests/unit/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-10-14 21:55:08 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-10-17 21:28:31 +0200
commite5996f626b573e955c78dd680211700b3f5f42b3 (patch)
tree9a938c41f10b3d5090103477b51eb684a89d9862 /tests/unit/plugins
parentd8c7cf41b5bee01548243f8d8f611939e27a6fd6 (diff)
downloadweechat-e5996f626b573e955c78dd680211700b3f5f42b3.zip
irc: use parsed command parameters in "part" command callback
Diffstat (limited to 'tests/unit/plugins')
-rw-r--r--tests/unit/plugins/irc/test-irc-protocol.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp
index 3d8d23ccc..d9f35bac5 100644
--- a/tests/unit/plugins/irc/test-irc-protocol.cpp
+++ b/tests/unit/plugins/irc/test-irc-protocol.cpp
@@ -1435,7 +1435,7 @@ TEST(IrcProtocolWithServer, part)
/* not enough arguments */
RECV(":alice!user@host PART");
- CHECK_ERROR_ARGS("part", 2, 3);
+ CHECK_ERROR_PARAMS("part", 0, 1);
STRCMP_EQUAL("#test", ptr_server->channels->name);
CHECK(ptr_server->channels->nicks);
@@ -1457,15 +1457,19 @@ TEST(IrcProtocolWithServer, part)
RECV(":alice!user@host JOIN #test");
RECV(":alice!user@host PART #test :part message");
+ CHECK_CHAN("<-- alice (user@host) has left #test (part message)");
STRCMP_EQUAL("#test", ptr_server->channels->name);
POINTERS_EQUAL(NULL, ptr_server->channels->nicks);
LONGS_EQUAL(1, ptr_server->channels->part);
RECV(":alice!user@host JOIN #test");
+ CHECK_CHAN("--> alice (user@host) has joined #test");
RECV(":bob!user@host JOIN #test");
+ CHECK_CHAN("--> bob (user@host) has joined #test");
/* part from another user */
RECV(":bob!user@host PART #test :part message");
+ CHECK_CHAN("<-- bob (user@host) has left #test (part message)");
STRCMP_EQUAL("#test", ptr_server->channels->name);
CHECK(ptr_server->channels->nicks == ptr_server->channels->last_nick);
LONGS_EQUAL(0, ptr_server->channels->part);