const char *tmp;
bool first = TRUE, in_group = FALSE;
+ if (addr == NULL)
+ return;
+
+ /* <> path */
+ if (addr->mailbox == NULL && addr->domain == NULL) {
+ i_assert(addr->next == NULL);
+ str_append(str, "<>");
+ return;
+ }
+
/* a) mailbox@domain
b) name <@route:mailbox@domain>
c) group: .. ; */
cmp_addr(addr, &group_suffix));
test_assert(strcmp(str_c(str), "group:;") == 0);
test_end();
+
+ test_begin("message address parsing empty string");
+ test_assert(message_address_parse(unsafe_data_stack_pool, &uchar_nul, 0, 10, TRUE) == NULL);
+ str_truncate(str, 0);
+ message_address_write(str, NULL);
+ test_assert(str_len(str) == 0);
+ test_end();
}
int main(void)