summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-10-09 11:27:51 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-10-09 11:27:51 +0200
commited9104fbea6fce6ab976c41620a92a73994e79b2 (patch)
tree97598e28b4510bbc4f7e50c83dcc0be8e4040a82 /tests
parent68a3aca643733713427dbd7686bb49206a21b943 (diff)
downloadweechat-ed9104fbea6fce6ab976c41620a92a73994e79b2.zip
irc: fix parsing of CAP message when there is no prefix (closes #1707)
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/plugins/irc/test-irc-protocol.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp
index 67776fc80..22577a5e6 100644
--- a/tests/unit/plugins/irc/test-irc-protocol.cpp
+++ b/tests/unit/plugins/irc/test-irc-protocol.cpp
@@ -538,9 +538,20 @@ TEST(IrcProtocolWithServer, cap)
server_recv (":server 001 alice");
/* not enough arguments */
+ server_recv ("CAP");
+ server_recv ("CAP *");
server_recv (":server CAP");
server_recv (":server CAP *");
+ server_recv ("CAP * LS :identify-msg multi-prefix sasl");
+ server_recv ("CAP * LS * :identify-msg multi-prefix sasl");
+ server_recv ("CAP * LIST :identify-msg multi-prefix sasl");
+ server_recv ("CAP * LIST * :identify-msg multi-prefix sasl");
+ server_recv ("CAP * NEW :identify-msg multi-prefix sasl");
+ server_recv ("CAP * DEL :identify-msg multi-prefix sasl");
+ server_recv ("CAP * ACK :sasl");
+ server_recv ("CAP * NAK :sasl");
+
server_recv (":server CAP * LS :identify-msg multi-prefix sasl");
server_recv (":server CAP * LS * :identify-msg multi-prefix sasl");
server_recv (":server CAP * LIST :identify-msg multi-prefix sasl");