tests: add remaining sendto_* tests
This commit is contained in:
parent
42ae8ab21f
commit
54f75d36e3
4 changed files with 2530 additions and 2 deletions
|
@ -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>";
|
||||
|
|
|
@ -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 { \
|
||||
|
|
2494
tests/send1.c
2494
tests/send1.c
File diff suppressed because it is too large
Load diff
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue