1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

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

This commit is contained in:
Sébastien Helleu
2021-10-16 09:25:59 +02:00
parent 3360cadd55
commit 572bcc2c59
2 changed files with 22 additions and 15 deletions
+7 -7
View File
@@ -2429,19 +2429,19 @@ TEST(IrcProtocolWithServer, 311)
{
SRV_INIT;
/* not enough arguments */
/* not enough parameters */
RECV(":server 311");
CHECK_ERROR_ARGS("311", 2, 8);
CHECK_ERROR_PARAMS("311", 0, 6);
RECV(":server 311 alice");
CHECK_ERROR_ARGS("311", 3, 8);
CHECK_ERROR_PARAMS("311", 1, 6);
RECV(":server 311 alice bob");
CHECK_ERROR_ARGS("311", 4, 8);
CHECK_ERROR_PARAMS("311", 2, 6);
RECV(":server 311 alice bob user");
CHECK_ERROR_ARGS("311", 5, 8);
CHECK_ERROR_PARAMS("311", 3, 6);
RECV(":server 311 alice bob user host");
CHECK_ERROR_ARGS("311", 6, 8);
CHECK_ERROR_PARAMS("311", 4, 6);
RECV(":server 311 alice bob user host *");
CHECK_ERROR_ARGS("311", 7, 8);
CHECK_ERROR_PARAMS("311", 5, 6);
RECV(":server 311 alice bob user host * :real name");
CHECK_SRV("-- [bob] (user@host): real name");