Use a different cap for send tests

This commit is contained in:
Ed Kellett 2020-04-26 15:46:32 +01:00
parent 91ccda4f8c
commit 0934799fb9
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

@ -49,7 +49,7 @@ int rb_gettimeofday(struct timeval *tv, void *tz)
unsigned int CAP_ACCOUNT_TAG;
unsigned int CAP_SERVER_TIME;
unsigned int CAP_INVITE_NOTIFY;
unsigned int CAP_MULTI_PREFIX;
static struct Client *user;
static struct Client *server;
@ -1604,10 +1604,10 @@ static void sendto_channel_local_with_capability1(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
sendto_channel_local_with_capability(user, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_o, "On channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1617,7 +1617,7 @@ static void sendto_channel_local_with_capability1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -1637,7 +1637,7 @@ static void sendto_channel_local_with_capability1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_VOICE, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_VOICE, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not +v; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1647,7 +1647,7 @@ static void sendto_channel_local_with_capability1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_VOICE, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_VOICE, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not +v; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "Has +v; " MSG);
@ -1667,7 +1667,7 @@ static void sendto_channel_local_with_capability1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_o, "Has +o; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1677,7 +1677,7 @@ static void sendto_channel_local_with_capability1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "Has +o; " MSG);
@ -1697,7 +1697,7 @@ static void sendto_channel_local_with_capability1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_o, "Has +o/+v; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1707,7 +1707,7 @@ static void sendto_channel_local_with_capability1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "Has +o/+v; " MSG);
@ -1734,8 +1734,8 @@ static void sendto_channel_local_with_capability1__tags(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
strcpy(user->user->suser, "test");
local_chan_o->localClient->caps |= CAP_ACCOUNT_TAG;
@ -1743,7 +1743,7 @@ static void sendto_channel_local_with_capability1__tags(void)
local_chan_ov->localClient->caps |= CAP_SERVER_TIME;
local_chan_v->localClient->caps |= CAP_ACCOUNT_TAG;
sendto_channel_local_with_capability(user, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME ";account=test Hello World!" CRLF, local_chan_o, "On channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1753,7 +1753,7 @@ static void sendto_channel_local_with_capability1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -1773,7 +1773,7 @@ static void sendto_channel_local_with_capability1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_VOICE, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_VOICE, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not +v; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1783,7 +1783,7 @@ static void sendto_channel_local_with_capability1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_VOICE, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_VOICE, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not +v; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "Has +v; " MSG);
@ -1803,7 +1803,7 @@ static void sendto_channel_local_with_capability1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME ";account=test Hello World!" CRLF, local_chan_o, "Has +o; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1813,7 +1813,7 @@ static void sendto_channel_local_with_capability1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "Has +o; " MSG);
@ -1833,7 +1833,7 @@ static void sendto_channel_local_with_capability1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME ";account=test Hello World!" CRLF, local_chan_o, "Has +o/+v; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1843,7 +1843,7 @@ static void sendto_channel_local_with_capability1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability(user, CHFL_CHANOP | CHFL_VOICE, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "Has +o/+v; " MSG);
@ -1870,10 +1870,10 @@ static void sendto_channel_local_with_capability_butone1(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_o, "On channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1883,7 +1883,7 @@ static void sendto_channel_local_with_capability_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -1903,7 +1903,7 @@ static void sendto_channel_local_with_capability_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1913,7 +1913,7 @@ static void sendto_channel_local_with_capability_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -1933,7 +1933,7 @@ static void sendto_channel_local_with_capability_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_o, "On channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1943,7 +1943,7 @@ static void sendto_channel_local_with_capability_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -1970,8 +1970,8 @@ static void sendto_channel_local_with_capability_butone1__tags(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
strcpy(local_chan_o->user->suser, "test_o");
strcpy(local_chan_p->user->suser, "test_p");
@ -1980,7 +1980,7 @@ static void sendto_channel_local_with_capability_butone1__tags(void)
local_chan_ov->localClient->caps |= CAP_SERVER_TIME;
local_chan_v->localClient->caps |= CAP_ACCOUNT_TAG;
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_o, "On channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -1990,7 +1990,7 @@ static void sendto_channel_local_with_capability_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(NULL, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -2010,7 +2010,7 @@ static void sendto_channel_local_with_capability_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -2020,7 +2020,7 @@ static void sendto_channel_local_with_capability_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_o, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -2040,7 +2040,7 @@ static void sendto_channel_local_with_capability_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, CAP_INVITE_NOTIFY, 0, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, CAP_MULTI_PREFIX, 0, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME ";account=test_p Hello World!" CRLF, local_chan_o, "On channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -2050,7 +2050,7 @@ static void sendto_channel_local_with_capability_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, 0, CAP_INVITE_NOTIFY, channel, "Hello %s!", "World");
sendto_channel_local_with_capability_butone(local_chan_p, ALL_MEMBERS, 0, CAP_MULTI_PREFIX, channel, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "On channel; " MSG);
@ -2280,10 +2280,10 @@ static void sendto_common_channels_local1(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
sendto_common_channels_local(local_chan_o, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local(local_chan_o, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_o, "Has cap; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -2294,7 +2294,7 @@ static void sendto_common_channels_local1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_chan_o, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local(local_chan_o, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "Doesn't have cap; " MSG);
@ -2316,7 +2316,7 @@ static void sendto_common_channels_local1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2326,7 +2326,7 @@ static void sendto_common_channels_local1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2346,9 +2346,9 @@ static void sendto_common_channels_local1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
local_no_chan->localClient->caps |= CAP_INVITE_NOTIFY;
local_no_chan->localClient->caps |= CAP_MULTI_PREFIX;
sendto_common_channels_local(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2358,7 +2358,7 @@ static void sendto_common_channels_local1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2385,8 +2385,8 @@ static void sendto_common_channels_local1__tags(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
strcpy(local_chan_o->user->suser, "test_o");
strcpy(local_no_chan->user->suser, "test_n");
@ -2395,7 +2395,7 @@ static void sendto_common_channels_local1__tags(void)
local_chan_ov->localClient->caps |= CAP_SERVER_TIME;
local_chan_v->localClient->caps |= CAP_ACCOUNT_TAG;
sendto_common_channels_local(local_chan_o, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local(local_chan_o, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME ";account=test_o Hello World!" CRLF, local_chan_o, "Has cap; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -2406,7 +2406,7 @@ static void sendto_common_channels_local1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_chan_o, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local(local_chan_o, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Has cap; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "Doesn't have cap; " MSG);
@ -2430,7 +2430,7 @@ static void sendto_common_channels_local1__tags(void)
local_no_chan->localClient->caps |= CAP_SERVER_TIME;
sendto_common_channels_local(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2440,7 +2440,7 @@ static void sendto_common_channels_local1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2460,10 +2460,10 @@ static void sendto_common_channels_local1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
local_no_chan->localClient->caps |= CAP_INVITE_NOTIFY;
local_no_chan->localClient->caps |= CAP_MULTI_PREFIX;
local_no_chan->localClient->caps |= CAP_ACCOUNT_TAG;
sendto_common_channels_local(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2473,7 +2473,7 @@ static void sendto_common_channels_local1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2495,7 +2495,7 @@ static void sendto_common_channels_local1__tags(void)
local_no_chan->localClient->caps &= ~CAP_SERVER_TIME;
sendto_common_channels_local(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2505,7 +2505,7 @@ static void sendto_common_channels_local1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2532,10 +2532,10 @@ static void sendto_common_channels_local_butone1(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
sendto_common_channels_local_butone(local_chan_o, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local_butone(local_chan_o, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -2546,7 +2546,7 @@ static void sendto_common_channels_local_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_chan_o, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local_butone(local_chan_o, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_ov, "Doesn't have cap; " MSG);
@ -2568,7 +2568,7 @@ static void sendto_common_channels_local_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2578,7 +2578,7 @@ static void sendto_common_channels_local_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2598,9 +2598,9 @@ static void sendto_common_channels_local_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
local_no_chan->localClient->caps |= CAP_INVITE_NOTIFY;
local_no_chan->localClient->caps |= CAP_MULTI_PREFIX;
sendto_common_channels_local_butone(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2610,7 +2610,7 @@ static void sendto_common_channels_local_butone1(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2637,8 +2637,8 @@ static void sendto_common_channels_local_butone1__tags(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
strcpy(local_chan_o->user->suser, "test_o");
strcpy(local_no_chan->user->suser, "test_n");
@ -2647,7 +2647,7 @@ static void sendto_common_channels_local_butone1__tags(void)
local_chan_ov->localClient->caps |= CAP_SERVER_TIME;
local_chan_v->localClient->caps |= CAP_ACCOUNT_TAG;
sendto_common_channels_local_butone(local_chan_o, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local_butone(local_chan_o, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -2658,7 +2658,7 @@ static void sendto_common_channels_local_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_chan_o, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local_butone(local_chan_o, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Is the one (neo); " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_ov, "Doesn't have cap; " MSG);
@ -2682,7 +2682,7 @@ static void sendto_common_channels_local_butone1__tags(void)
local_no_chan->localClient->caps |= CAP_SERVER_TIME;
sendto_common_channels_local_butone(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2692,7 +2692,7 @@ static void sendto_common_channels_local_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2712,10 +2712,10 @@ static void sendto_common_channels_local_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
local_no_chan->localClient->caps |= CAP_INVITE_NOTIFY;
local_no_chan->localClient->caps |= CAP_MULTI_PREFIX;
local_no_chan->localClient->caps |= CAP_ACCOUNT_TAG;
sendto_common_channels_local_butone(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2725,7 +2725,7 @@ static void sendto_common_channels_local_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2747,7 +2747,7 @@ static void sendto_common_channels_local_butone1__tags(void)
local_no_chan->localClient->caps &= ~CAP_SERVER_TIME;
sendto_common_channels_local_butone(local_no_chan, CAP_INVITE_NOTIFY, 0, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, CAP_MULTI_PREFIX, 0, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -2757,7 +2757,7 @@ static void sendto_common_channels_local_butone1__tags(void)
is_client_sendq_empty(server, MSG);
is_client_sendq_empty(server2, MSG);
sendto_common_channels_local_butone(local_no_chan, 0, CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_common_channels_local_butone(local_no_chan, 0, CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_o, "Not on common channel; " MSG);
is_client_sendq_empty(local_chan_ov, "Not on common channel; " MSG);
@ -3198,10 +3198,10 @@ static void sendto_local_clients_with_capability1(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
sendto_local_clients_with_capability(CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_local_clients_with_capability(CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Doesn't have cap; " MSG);
is_client_sendq("Hello World!" CRLF, local_chan_o, "Has cap; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -3218,8 +3218,8 @@ static void sendto_local_clients_with_capability1__tags(void)
{
standard_init();
local_chan_o->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_v->localClient->caps |= CAP_INVITE_NOTIFY;
local_chan_o->localClient->caps |= CAP_MULTI_PREFIX;
local_chan_v->localClient->caps |= CAP_MULTI_PREFIX;
strcpy(user->user->suser, "test");
strcpy(local_chan_o->user->suser, "test_o");
@ -3232,7 +3232,7 @@ static void sendto_local_clients_with_capability1__tags(void)
local_chan_ov->localClient->caps |= CAP_SERVER_TIME;
local_chan_v->localClient->caps |= CAP_ACCOUNT_TAG;
sendto_local_clients_with_capability(CAP_INVITE_NOTIFY, "Hello %s!", "World");
sendto_local_clients_with_capability(CAP_MULTI_PREFIX, "Hello %s!", "World");
is_client_sendq_empty(user, "Doesn't have cap; " MSG);
is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, local_chan_o, "Has cap; " MSG);
is_client_sendq_empty(local_chan_ov, "Doesn't have cap; " MSG);
@ -4913,8 +4913,8 @@ int main(int argc, char *argv[])
CAP_SERVER_TIME = capability_get(cli_capindex, "server-time", NULL);
ok(CAP_SERVER_TIME != 0, "CAP_SERVER_TIME missing; " MSG);
CAP_INVITE_NOTIFY = capability_get(cli_capindex, "invite-notify", NULL);
ok(CAP_INVITE_NOTIFY != 0, "CAP_INVITE_NOTIFY missing; " MSG);
CAP_MULTI_PREFIX = capability_get(cli_capindex, "multi-prefix", NULL);
ok(CAP_MULTI_PREFIX != 0, "CAP_MULTI_PREFIX missing; " MSG);
sendto_one1();
sendto_one1__tags();