diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index c3b9233b6..66dddac08 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -1566,13 +1566,17 @@ TEST(IrcProtocolWithServer, privmsg) SRV_INIT_JOIN2; - /* not enough arguments */ + /* not enough parameters */ RECV(":bob!user@host PRIVMSG"); - CHECK_ERROR_ARGS("privmsg", 2, 4); + CHECK_ERROR_PARAMS("privmsg", 0, 2); RECV(":bob!user@host PRIVMSG #test"); - CHECK_ERROR_ARGS("privmsg", 3, 4); + CHECK_ERROR_PARAMS("privmsg", 1, 2); RECV(":bob!user@host PRIVMSG alice"); - CHECK_ERROR_ARGS("privmsg", 3, 4); + CHECK_ERROR_PARAMS("privmsg", 1, 2); + + /* missing nick */ + RECV("PRIVMSG #test :this is the message"); + CHECK_ERROR_NICK("privmsg"); /* message to channel/user */ RECV(":bob!user@host PRIVMSG #test :this is the message"); |