/dovecot/src/doveadm/ |
H A D | doveadm-dump.h | 8 bool (*test)(const char *path); member in struct:doveadm_cmd_dump
|
/dovecot/src/lib/ |
H A D | test-istream-try.c | 3 #include "test-lib.h" 12 for (unsigned int test = 0; test <= 10; test++) { 23 test_assert_idx(i_stream_read(try_input) == 0, test); local 25 switch (test) { 29 test_assert_idx(i_stream_read(try_input) == 1, test); local 30 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 1, test); local 31 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 0, test); local 36 test_assert_idx(i_stream_read(try_input) == 0, test); local 37 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 0, test); local 38 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 0, test); local 41 test_assert_idx(i_stream_read(try_input) == 1, test); local 42 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 0, test); local 43 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 1, test); local 49 test_assert_idx(i_stream_read(try_input) == 1, test); local 50 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 1, test); local 51 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 0, test); local 56 test_assert_idx(i_stream_read(try_input) == 0, test); local 57 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 0, test); local 58 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 0, test); local 61 test_assert_idx(i_stream_read(try_input) == 1, test); local 62 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 0, test); local 63 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 1, test); local 68 test_assert_idx(i_stream_read(try_input) == 0, test); local 69 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 0, test); local 70 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 0, test); local 76 test_assert_idx(i_stream_read(try_input) == 1, test); local 77 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 0, test); local 78 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 1, test); local 84 test_assert_idx(i_stream_read(try_input) == 1, test); local 85 test_assert_idx(i_stream_get_data_size(test_inputs[0]) == 1, test); local 86 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 0, test); local 92 test_assert_idx(i_stream_read(try_input) == -1, test); local 99 test_assert_idx(i_stream_read(try_input) == -1, test); local 106 test_assert_idx(i_stream_read(try_input) == -1, test); local 113 test_assert_idx(i_stream_read(try_input) == -1, test); local 115 test_assert_idx(i_stream_get_data_size(test_inputs[1]) == 0, test); local [all...] |
H A D | test-numpack.c | 3 #include "test-lib.h" 8 static const struct test { struct
|
H A D | test-utc-mktime.c | 3 #include "test-lib.h" 46 const struct test_utc_mktime *test = &tests[i]; local 48 tm.tm_year = test->year - 1900; 49 tm.tm_mon = test->month - 1; 50 tm.tm_mday = test->day; 51 tm.tm_hour = test->hour; 52 tm.tm_min = test->min; 53 tm.tm_sec = test->sec; 56 success = t == test->out; 59 (long)t, (long)test [all...] |
H A D | test-buffer.c | 3 #include "test-lib.h" 14 int test = -1; local 32 test = i_rand_limit(6); 34 switch (test) { 129 t_strdup_printf("round %u test %d failed", i, test)); 243 /* special test cases for auth policy */
|
H A D | test-istream-base64-encoder.c | 3 #include "test-lib.h" 8 static const struct test { struct
|
H A D | test-seq-range-array.c | 3 #include "test-lib.h" 96 int test = -1; local 104 test = i_rand() % 4; 105 switch (test) { 162 t_strdup_printf("round %u test %d failed", i, test));
|
/dovecot/src/lib-mail/ |
H A D | test-message-date.c | 5 #include "test-common.h" 47 const struct test_message_date *test = &tests[i]; local 48 ret = message_date_parse((const unsigned char *)test->input, 49 strlen(test->input), &t, &tz); 50 success = (!ret && !test->ret) || 51 (ret == test->ret && t == test->time && 52 tz == test->tz_offset);
|
H A D | test-ostream-dot.c | 9 #include "test-common.h" 16 static void test_ostream_dot_one(const struct dot_test *test) argument 25 test_input = test_istream_create(test->input); 43 test_assert(output->offset == strlen(test->input)); 44 test_assert(test_output->offset == strlen(test->output)); 48 test_assert(strcmp(str_c(output_data), test->output) == 0);
|
H A D | test-istream-dot.c | 7 #include "test-common.h" 15 static void test_istream_dot_one(const struct dot_test *test, argument 27 test_input = test_istream_create(test->input); 30 input_len = strlen(test->input); 31 output_len = strlen(test->output); 33 (test->input[input_len-1] == '\n' || 34 strstr(test->input, "\n.\n") != NULL || 35 strstr(test->input, "\n.\r\n") != NULL)) { 37 test->output[output_len-1] == '\n') { 40 test [all...] |
H A D | test-message-address.c | 6 #include "test-common.h" 35 static const struct test { struct 213 const struct test *test = &tests[i/2]; local 218 &test->addr : &test->filled_addr; 219 addr = test_parse_address(test->input, fill_missing); 223 /* test the address alone */ 226 if (fill_missing && test->wanted_filled_output != NULL) 227 wanted_string = test 318 static const struct test { struct 351 const struct test *test = &tests[i]; local [all...] |
/dovecot/src/plugins/quota/ |
H A D | test-quota-util.c | 5 #include "test-common.h" 7 struct test { struct 19 static const struct test tests[] = { 20 /* first test only with new_size=1. these are used for both 66 (uint64_t)ctx.count_used <= ctx.count_ceil); /* test is broken otherwise */ 82 (uint64_t)ctx.bytes_used <= ctx.bytes_ceil); /* test is broken otherwise */
|
/dovecot/src/lib-imap/ |
H A D | test-imap-match.c | 5 #include "test-common.h" 15 struct test_imap_match test[] = { local 59 for (i = 0; i < N_ELEMENTS(test); i++) { 60 glob = imap_match_init(pool, test[i].pattern, 62 test_assert(imap_match(glob, test[i].input) == test[i].result); 68 /* test the dup after clearing first one's memory */ 69 test_assert(imap_match(glob2, test[i].input) == test[i].result); 83 /* test th [all...] |
H A D | test-imap-envelope.c | 9 #include "test-common.h" 150 struct parse_test *test = &parse_tests[i]; local 155 envlp = msg_parse(pool, test->message); 158 test_assert(strcmp(str_c(str), test->envelope) == 0); 173 struct parse_test *test = &parse_tests[i]; local 179 ret = imap_envelope_parse(test->envelope, pool, &envlp, &error); 185 test_assert(strcmp(str_c(str), test->envelope) == 0);
|
H A D | test-imap-utf7.c | 7 #include "test-common.h" 11 static const struct test { struct
|
H A D | test-imap-bodystructure.c | 9 #include "test-common.h" 192 "Content-Location: http://example.com/test.txt\n" 224 "(\"text\" \"x-myown\" (\"charset\" \"us-ascii\" \"foo\" \"quoted\\\"string\") \"<foo@example.com>\" \"hellodescription\" \"7bit\" 7 1 \"Q2hlY2sgSW50ZWdyaXR5IQ==\" (\"inline\" (\"foo\" \"bar\")) (\"en\" \"fi\" \"se\") \"http://example.com/test.txt\")(\"message\" \"rfc822\" NIL NIL NIL \"7bit\" 412 (\"Sun, 12 Aug 2012 12:34:56 +0300\" \"submsg\" ((NIL NIL \"sub\" \"domain.org\")) ((NIL NIL \"sub\" \"domain.org\")) ((NIL NIL \"sub\" \"domain.org\")) ((NIL NIL \"sub-to1\" \"domain.org\")(NIL NIL \"sub-to2\" \"domain.org\")) NIL NIL NIL NIL) ((\"text\" \"html\" (\"charset\" \"us-ascii\") NIL NIL \"8bit\" 20 1 NIL NIL NIL NIL)(\"text\" \"plain\" (\"charset\" \"us-ascii\") NIL NIL \"7bit\" 21 1 NIL NIL NIL NIL) \"alternative\" (\"boundary\" \"sub1\") NIL NIL NIL) 21 NIL NIL NIL NIL) \"mixed\" (\"boundary\" \"foo bar\") NIL NIL NIL", 414 struct parse_test *test = &parse_tests[i]; local 419 parts = msg_parse(pool, test->message, TRUE); 422 test_assert(strcmp(str_c(str), test->bodystructure) == 0); 426 test_assert(strcmp(str_c(str), test->body) == 0); 441 struct parse_test *test = &parse_tests[i]; local 446 parts = msg_parse(pool, test->message, FALSE); 448 test_assert(imap_body_parse_from_bodystructure(test 476 struct parse_test *test = &parse_tests[i]; local 508 struct normalize_test *test = &normalize_tests[i]; local [all...] |
/dovecot/src/lib-smtp/ |
H A D | test-smtp-reply-parser.c | 3 #include "test-lib.h" 10 #include "test-common.h" 114 const struct smtp_reply_parse_valid_test *test; local 120 test = &valid_reply_parse_tests[i]; 121 input = i_stream_create_from_data(test->reply, strlen(test->reply)); 122 parser = smtp_reply_parser_init(input, test->max_size); 127 if (test->ehlo) { 133 (parser, test->enhanced_code.x > 0, &reply, &error)) > 0) { 141 test_out(t_strdup_printf("reply->status = %d", test 228 const struct smtp_reply_parse_invalid_test *test; local [all...] |
H A D | test-smtp-command-parser.c | 3 #include "test-lib.h" 10 #include "test-common.h" 71 const struct smtp_command_parse_valid_test *test; local 77 test = &valid_command_parse_tests[i]; 78 input = i_stream_create_from_data(test->command, 79 strlen(test->command)); 80 parser = smtp_command_parser_init(input, &test->limits); 93 test->cmd_name), 94 null_strcmp(cmd_name, test->cmd_name) == 0); 96 str_sanitize(test 151 const struct smtp_command_parse_invalid_test *test; local 218 const struct smtp_auth_response_parse_valid_test *test; local 285 const struct smtp_auth_response_parse_invalid_test *test; local [all...] |
H A D | test-smtp-address.c | 3 #include "test-lib.h" 5 #include "test-common.h" 108 const struct valid_mailbox_parse_test *test; local 113 test = &valid_mailbox_parse_tests[i]; 115 test->input, test->flags, &address, &error); 119 test->input), ret > 0, error); 123 test->address.localpart == NULL) { 126 (address->localpart == test->address.localpart)); 130 strcmp(address->localpart, test 192 const struct valid_path_parse_test *test; local 326 const struct valid_username_parse_test *test; local 469 const struct invalid_mailbox_parse_test *test; local 679 const struct invalid_path_parse_test *test; local 723 const struct invalid_username_parse_test *test; local 781 const struct address_detail_parse_test *test = local [all...] |
H A D | test-smtp-params.c | 3 #include "test-lib.h" 6 #include "test-common.h" 202 test_smtp_mail_params_auth(const struct smtp_params_mail *test, argument 206 test->auth->localpart == NULL) { 209 (parsed->auth->localpart == test->auth->localpart)); 214 test->auth->localpart) == 0); 217 test->auth->domain == NULL) { 220 (parsed->auth->domain == test->auth->domain)); 225 test->auth->domain) == 0); 230 test_smtp_mail_params_body(const struct smtp_params_mail *test, argument 263 test_smtp_mail_params_envid(const struct smtp_params_mail *test, const struct smtp_params_mail *parsed) argument 279 test_smtp_mail_params_ret(const struct smtp_params_mail *test, const struct smtp_params_mail *parsed) argument 303 test_smtp_mail_params_size(const struct smtp_params_mail *test, const struct smtp_params_mail *parsed) argument 311 test_smtp_mail_params_extensions(const struct smtp_params_mail *test, const struct smtp_params_mail *parsed) argument 360 const struct valid_mail_params_parse_test *test; local 469 const struct invalid_mail_params_parse_test *test; local 590 test_smtp_rcpt_params_orcpt(const struct smtp_params_rcpt *test, const struct smtp_params_rcpt *parsed) argument 627 test_smtp_rcpt_params_notify(const struct smtp_params_rcpt *test, const struct smtp_params_rcpt *parsed) argument 660 test_smtp_rcpt_params_extensions(const struct smtp_params_rcpt *test, const struct smtp_params_rcpt *parsed) argument 709 const struct valid_rcpt_params_parse_test *test; local 788 const struct invalid_rcpt_params_parse_test *test; local [all...] |
/dovecot/src/lib-http/ |
H A D | test-http-auth.c | 3 #include "test-lib.h" 4 #include "test-common.h" 92 const struct http_auth_challenges_test *test; local 95 test = &valid_auth_challenges_tests[i]; 96 challenges_in = test->challenges_in; 111 chalt = test->challenges; 211 const struct http_auth_credentials_test *test; local 214 test = &valid_auth_credentials_tests[i]; 215 credentials_in = test->credentials_in; 230 strcmp(out.scheme, test [all...] |
H A D | test-http-request-parser.c | 3 #include "test-lib.h" 9 #include "test-common.h" 200 const struct http_request_valid_parse_test *test; local 208 test = &valid_request_parse_tests[i]; 209 request_text = test->request; 212 parser = http_request_parser_init(input, NULL, test->flags); 245 if (request.method == NULL || test->method == NULL) { 247 request.method == test->method); 250 strcmp(request.method, test->method) == 0); 253 if (request.target_raw == NULL || test 438 const struct http_request_invalid_parse_test *test; local [all...] |
H A D | test-http-response-parser.c | 3 #include "test-lib.h" 9 #include "test-common.h" 171 const struct valid_parse_test *test; local 180 test = &valid_response_parse_tests[i]; 181 input_text = test->input; 213 test_assert(j < test->responses_count); 214 if (j >= test->responses_count) 216 tresponse = &test->responses[j]; 234 if (++j == test->responses_count) 322 const char *test; local [all...] |
/dovecot/src/lib-index/ |
H A D | test-mail-transaction-log-file.c | 5 #include "test-common.h" 173 static size_t update_modseq_test_get_size(const struct update_modseq_test *test) argument 176 test->type & MAIL_TRANSACTION_TYPE_MASK; 227 const struct update_modseq_test *test = &update_modseq_tests[i]; local 228 const void *data = test->v.flag_update; 234 hdr.type = test->type; 235 hdr.size = sizeof(hdr) + update_modseq_test_get_size(test) * test->count; 237 mail_transaction_update_modseq(&hdr, data, &cur_modseq, test->version); 239 test_assert_idx(test [all...] |