tests: add remaining sendto_* tests

This commit is contained in:
Simon Arlott 2017-08-06 01:12:59 +01:00
parent 42ae8ab21f
commit 54f75d36e3
No known key found for this signature in database
GPG Key ID: C8975F2043CA5D24
4 changed files with 2530 additions and 2 deletions

View File

@ -160,6 +160,10 @@ void remove_remote_server(struct Client *server)
exit_client(server, server, server->servptr, "Test server removed");
}
struct Channel *make_channel(void)
{
return allocate_channel(TEST_CHANNEL);
}
char *get_client_sendq(const struct Client *client)
{
@ -171,7 +175,7 @@ char *get_client_sendq(const struct Client *client)
memset(buf, 0, sizeof(buf));
ret = rb_linebuf_get(&client->localClient->buf_sendq, buf, sizeof(buf), 0, 1);
if (is_bool(ret > 0, true, MSG)) {
if (ok(ret > 0, MSG)) {
return buf;
} else {
return "<get_client_sendq error>";

View File

@ -44,6 +44,20 @@
#define TEST_REMOTE_NICK "remote_test"
#define TEST_REMOTE_ID TEST_SERVER_ID "00001"
#define TEST_SERVER2_NAME "remote2.test"
#define TEST_SERVER2_ID "2CC"
#define TEST_REMOTE2_NICK "remote2_test"
#define TEST_REMOTE2_ID TEST_SERVER2_ID "00002"
#define TEST_SERVER3_NAME "remote3.test"
#define TEST_SERVER3_ID "3DD"
#define TEST_REMOTE3_NICK "remote3_test"
#define TEST_REMOTE3_ID TEST_SERVER3_ID "00003"
#define TEST_CHANNEL "#test"
#define CRLF "\r\n"
void client_util_init(void);
@ -65,6 +79,8 @@ void make_remote_person_oper(struct Client *client);
void remove_remote_person(struct Client *client);
void remove_remote_server(struct Client *server);
struct Channel *make_channel(void);
char *get_client_sendq(const struct Client *client);
#define is_client_sendq_empty(client, message, ...) do { \

File diff suppressed because it is too large Load Diff

View File

@ -11,3 +11,19 @@ connect "remote.test" {
class = "default";
};
connect "remote2.test" {
host = "::1";
fingerprint = "test";
class = "default";
};
connect "remote3.test" {
host = "::1";
fingerprint = "test";
class = "default";
};
privset "admin" {
privs = oper:admin;
};