diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-02-10 20:50:16 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-02-10 20:50:16 +0100 |
commit | ba7ff87d19217b92dda4eee6a5020aa29441bae1 (patch) | |
tree | 067310b0ff98aecf0737deebfea38708eb8d76d9 /tests/unit/plugins/irc/test-irc-protocol.cpp | |
parent | d7c8b16c4fcd366f294519268145a7217fa3900f (diff) | |
download | weechat-ba7ff87d19217b92dda4eee6a5020aa29441bae1.zip |
irc: fix parsing of message 223 (m_filter) sent by InspIRCd server (closes #1751)
Diffstat (limited to 'tests/unit/plugins/irc/test-irc-protocol.cpp')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 130 |
1 files changed, 66 insertions, 64 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index a7ee6eb0b..436ad2e54 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -2239,128 +2239,130 @@ TEST(IrcProtocolWithServer, whois_nick_msg) /* not enough parameters */ RECV(":server 223"); - CHECK_ERROR_PARAMS("223", 0, 3); + CHECK_ERROR_PARAMS("223", 0, 2); RECV(":server 223 alice"); - CHECK_ERROR_PARAMS("223", 1, 3); - RECV(":server 223 alice bob"); - CHECK_ERROR_PARAMS("223", 2, 3); + CHECK_ERROR_PARAMS("223", 1, 2); RECV(":server 264"); - CHECK_ERROR_PARAMS("264", 0, 3); + CHECK_ERROR_PARAMS("264", 0, 2); RECV(":server 264 alice"); - CHECK_ERROR_PARAMS("264", 1, 3); - RECV(":server 264 alice bob"); - CHECK_ERROR_PARAMS("264", 2, 3); + CHECK_ERROR_PARAMS("264", 1, 2); RECV(":server 275"); - CHECK_ERROR_PARAMS("275", 0, 3); + CHECK_ERROR_PARAMS("275", 0, 2); RECV(":server 275 alice"); - CHECK_ERROR_PARAMS("275", 1, 3); - RECV(":server 275 alice bob"); - CHECK_ERROR_PARAMS("275", 2, 3); + CHECK_ERROR_PARAMS("275", 1, 2); RECV(":server 276"); - CHECK_ERROR_PARAMS("276", 0, 3); + CHECK_ERROR_PARAMS("276", 0, 2); RECV(":server 276 alice"); - CHECK_ERROR_PARAMS("276", 1, 3); - RECV(":server 276 alice bob"); - CHECK_ERROR_PARAMS("276", 2, 3); + CHECK_ERROR_PARAMS("276", 1, 2); RECV(":server 307"); - CHECK_ERROR_PARAMS("307", 0, 3); + CHECK_ERROR_PARAMS("307", 0, 2); RECV(":server 307 alice"); - CHECK_ERROR_PARAMS("307", 1, 3); - RECV(":server 307 alice bob"); - CHECK_ERROR_PARAMS("307", 2, 3); + CHECK_ERROR_PARAMS("307", 1, 2); RECV(":server 310"); - CHECK_ERROR_PARAMS("310", 0, 3); + CHECK_ERROR_PARAMS("310", 0, 2); RECV(":server 310 alice"); - CHECK_ERROR_PARAMS("310", 1, 3); - RECV(":server 310 alice bob"); - CHECK_ERROR_PARAMS("310", 2, 3); + CHECK_ERROR_PARAMS("310", 1, 2); RECV(":server 313"); - CHECK_ERROR_PARAMS("313", 0, 3); + CHECK_ERROR_PARAMS("313", 0, 2); RECV(":server 313 alice"); - CHECK_ERROR_PARAMS("313", 1, 3); - RECV(":server 313 alice bob"); - CHECK_ERROR_PARAMS("313", 2, 3); + CHECK_ERROR_PARAMS("313", 1, 2); RECV(":server 318"); - CHECK_ERROR_PARAMS("318", 0, 3); + CHECK_ERROR_PARAMS("318", 0, 2); RECV(":server 318 alice"); - CHECK_ERROR_PARAMS("318", 1, 3); - RECV(":server 318 alice bob"); - CHECK_ERROR_PARAMS("318", 2, 3); + CHECK_ERROR_PARAMS("318", 1, 2); RECV(":server 319"); - CHECK_ERROR_PARAMS("319", 0, 3); + CHECK_ERROR_PARAMS("319", 0, 2); RECV(":server 319 alice"); - CHECK_ERROR_PARAMS("319", 1, 3); - RECV(":server 319 alice bob"); - CHECK_ERROR_PARAMS("319", 2, 3); + CHECK_ERROR_PARAMS("319", 1, 2); RECV(":server 320"); - CHECK_ERROR_PARAMS("320", 0, 3); + CHECK_ERROR_PARAMS("320", 0, 2); RECV(":server 320 alice"); - CHECK_ERROR_PARAMS("320", 1, 3); - RECV(":server 320 alice bob"); - CHECK_ERROR_PARAMS("320", 2, 3); + CHECK_ERROR_PARAMS("320", 1, 2); RECV(":server 326"); - CHECK_ERROR_PARAMS("326", 0, 3); + CHECK_ERROR_PARAMS("326", 0, 2); RECV(":server 326 alice"); - CHECK_ERROR_PARAMS("326", 1, 3); - RECV(":server 326 alice bob"); - CHECK_ERROR_PARAMS("326", 2, 3); + CHECK_ERROR_PARAMS("326", 1, 2); RECV(":server 335"); - CHECK_ERROR_PARAMS("335", 0, 3); + CHECK_ERROR_PARAMS("335", 0, 2); RECV(":server 335 alice"); - CHECK_ERROR_PARAMS("335", 1, 3); - RECV(":server 335 alice bob"); - CHECK_ERROR_PARAMS("335", 2, 3); + CHECK_ERROR_PARAMS("335", 1, 2); RECV(":server 378"); - CHECK_ERROR_PARAMS("378", 0, 3); + CHECK_ERROR_PARAMS("378", 0, 2); RECV(":server 378 alice"); - CHECK_ERROR_PARAMS("378", 1, 3); - RECV(":server 378 alice bob"); - CHECK_ERROR_PARAMS("378", 2, 3); + CHECK_ERROR_PARAMS("378", 1, 2); RECV(":server 379"); - CHECK_ERROR_PARAMS("379", 0, 3); + CHECK_ERROR_PARAMS("379", 0, 2); RECV(":server 379 alice"); - CHECK_ERROR_PARAMS("379", 1, 3); - RECV(":server 379 alice bob"); - CHECK_ERROR_PARAMS("379", 2, 3); + CHECK_ERROR_PARAMS("379", 1, 2); RECV(":server 671"); - CHECK_ERROR_PARAMS("671", 0, 3); + CHECK_ERROR_PARAMS("671", 0, 2); RECV(":server 671 alice"); - CHECK_ERROR_PARAMS("671", 1, 3); - RECV(":server 671 alice bob"); - CHECK_ERROR_PARAMS("671", 2, 3); + CHECK_ERROR_PARAMS("671", 1, 2); RECV(":server 223 alice bob UTF-8"); CHECK_SRV("-- [bob] UTF-8"); RECV(":server 223 alice bob :UTF-8"); CHECK_SRV("-- [bob] UTF-8"); + RECV(":server 223 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 264 alice bob :is using encrypted connection"); CHECK_SRV("-- [bob] is using encrypted connection"); + RECV(":server 264 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 275 alice bob :is using secure connection"); CHECK_SRV("-- [bob] is using secure connection"); + RECV(":server 275 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 276 alice bob :has client certificate fingerprint"); CHECK_SRV("-- [bob] has client certificate fingerprint"); + RECV(":server 276 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 307 alice bob :registered nick"); CHECK_SRV("-- [bob] registered nick"); + RECV(":server 307 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 310 alice bob :help mode"); CHECK_SRV("-- [bob] help mode"); + RECV(":server 310 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 313 alice bob :operator"); CHECK_SRV("-- [bob] operator"); + RECV(":server 313 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 318 alice bob :end"); CHECK_SRV("-- [bob] end"); + RECV(":server 318 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 319 alice bob :channels"); CHECK_SRV("-- [bob] channels"); + RECV(":server 319 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 320 alice bob :identified user"); CHECK_SRV("-- [bob] identified user"); + RECV(":server 320 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 326 alice bob :has oper privs"); CHECK_SRV("-- [bob] has oper privs"); + RECV(":server 326 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 335 alice bob :is a bot"); CHECK_SRV("-- [bob] is a bot"); + RECV(":server 335 alice bob"); + CHECK_SRV("-- bob"); + RECV(":server 378 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 378 alice bob :connecting from"); CHECK_SRV("-- [bob] connecting from"); + RECV(":server 378 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 379 alice bob :using modes"); CHECK_SRV("-- [bob] using modes"); + RECV(":server 379 alice bob"); + CHECK_SRV("-- bob"); RECV(":server 671 alice bob :secure connection"); CHECK_SRV("-- [bob] secure connection"); + RECV(":server 671 alice bob"); + CHECK_SRV("-- bob"); } /* @@ -2377,16 +2379,16 @@ TEST(IrcProtocolWithServer, whowas_nick_msg) /* not enough parameters */ RECV(":server 369"); - CHECK_ERROR_PARAMS("369", 0, 3); + CHECK_ERROR_PARAMS("369", 0, 2); RECV(":server 369 alice"); - CHECK_ERROR_PARAMS("369", 1, 3); - RECV(":server 369 alice bob"); - CHECK_ERROR_PARAMS("369", 2, 3); + CHECK_ERROR_PARAMS("369", 1, 2); RECV(":server 369 alice bob end"); CHECK_SRV("-- [bob] end"); RECV(":server 369 alice bob :end"); CHECK_SRV("-- [bob] end"); + RECV(":server 369 alice bob"); + CHECK_SRV("-- bob"); } /* |