void test_mutt_addr_append(void)
{
// struct Address *mutt_addr_append(struct Address **a, struct Address *b, bool prune);
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_append(NULL, &addr, false));
+ }
+
+ {
+ struct Address *addr = NULL;
+ TEST_CHECK(!mutt_addr_append(&addr, NULL, false));
+ }
}
void test_mutt_addr_cat(void)
{
// void mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *specials);
+
+ const char MimeSpecials[] = "@.,;:<>[]\\\"()?/= \t";
+
+ {
+ mutt_addr_cat(NULL, 32, "apple", MimeSpecials);
+ TEST_CHECK_(1, "mutt_addr_cat(NULL, 32, \"apple\", MimeSpecials)");
+ }
+
+ {
+ char buf[32];
+ mutt_addr_cat(buf, sizeof(buf), NULL, MimeSpecials);
+ TEST_CHECK_(1, "mutt_addr_cat(buf, sizeof(buf), NULL, MimeSpecials)");
+ }
+
+ {
+ char buf[32];
+ mutt_addr_cat(buf, sizeof(buf), "apple", NULL);
+ TEST_CHECK_(1, "mutt_addr_cat(buf, sizeof(buf), \"apple\", NULL)");
+ }
}
void test_mutt_addr_cmp(void)
{
// bool mutt_addr_cmp(struct Address *a, struct Address *b);
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_cmp(NULL, &addr));
+ }
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_cmp(&addr, NULL));
+ }
}
void test_mutt_addr_cmp_strict(void)
{
// bool mutt_addr_cmp_strict(const struct Address *a, const struct Address *b);
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_cmp_strict(NULL, &addr));
+ }
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_cmp_strict(&addr, NULL));
+ }
}
void test_mutt_addr_copy(void)
{
// struct Address *mutt_addr_copy(struct Address *addr);
+
+ {
+ TEST_CHECK(!mutt_addr_copy(NULL));
+ }
}
void test_mutt_addr_copy_list(void)
{
// struct Address *mutt_addr_copy_list(struct Address *addr, bool prune);
+
+ {
+ TEST_CHECK(!mutt_addr_copy_list(NULL, false));
+ }
}
void test_mutt_addr_for_display(void)
{
// const char * mutt_addr_for_display(struct Address *a);
+
+ {
+ TEST_CHECK(!mutt_addr_for_display(NULL));
+ }
}
void test_mutt_addr_free(void)
{
// void mutt_addr_free(struct Address **p);
+
+ {
+ mutt_addr_free(NULL);
+ TEST_CHECK_(1, "mutt_addr_free(NULL)");
+ }
}
void test_mutt_addr_has_recips(void)
{
// int mutt_addr_has_recips(struct Address *a);
+
+ {
+ TEST_CHECK(mutt_addr_has_recips(NULL) == 0);
+ }
}
void test_mutt_addr_is_intl(void)
{
// bool mutt_addr_is_intl(struct Address *a);
+
+ {
+ TEST_CHECK(!mutt_addr_is_intl(NULL));
+ }
}
void test_mutt_addr_is_local(void)
{
// bool mutt_addr_is_local(struct Address *a);
+
+ {
+ TEST_CHECK(!mutt_addr_is_local(NULL));
+ }
}
void test_mutt_addr_mbox_to_udomain(void)
{
// int mutt_addr_mbox_to_udomain(const char *mbox, char **user, char **domain);
+
+ {
+ char *user = NULL;
+ char *domain = NULL;
+ TEST_CHECK(mutt_addr_mbox_to_udomain(NULL, &user, &domain) == -1);
+ }
+
+ {
+ char *domain = NULL;
+ TEST_CHECK(mutt_addr_mbox_to_udomain("apple", NULL, &domain) == -1);
+ }
+
+ {
+ char *user = NULL;
+ TEST_CHECK(mutt_addr_mbox_to_udomain("apple", &user, NULL) == -1);
+ }
}
void test_mutt_addr_parse_list(void)
{
// struct Address *mutt_addr_parse_list(struct Address *top, const char *s);
+
+ {
+ struct Address *addr = NULL;
+ TEST_CHECK((addr = mutt_addr_parse_list(NULL, "apple")) != NULL);
+ mutt_addr_free(&addr);
+ }
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_parse_list(&addr, NULL));
+ }
}
void test_mutt_addr_parse_list2(void)
{
// struct Address *mutt_addr_parse_list2(struct Address *p, const char *s);
+
+ {
+ struct Address *addr = NULL;
+ TEST_CHECK((addr = mutt_addr_parse_list2(NULL, "apple")) != NULL);
+ mutt_addr_free(&addr);
+ }
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_parse_list2(&addr, NULL));
+ }
}
void test_mutt_addr_qualify(void)
{
// void mutt_addr_qualify(struct Address *addr, const char *host);
+
+ {
+ mutt_addr_qualify(NULL, "example.com");
+ TEST_CHECK_(1, "mutt_addr_qualify(NULL, \"example.com\")");
+ }
+
+ {
+ struct Address addr = { 0 };
+ mutt_addr_qualify(&addr, NULL);
+ TEST_CHECK_(1, "mutt_addr_qualify(&addr, NULL)");
+ }
}
void test_mutt_addr_remove_from_list(void)
{
// int mutt_addr_remove_from_list(struct Address **a, const char *mailbox);
+
+ {
+ TEST_CHECK(mutt_addr_remove_from_list(NULL, "apple") == -1);
+ }
+
+ {
+ struct Address *addr = NULL;
+ TEST_CHECK(mutt_addr_remove_from_list(&addr, NULL) == 0);
+ }
}
void test_mutt_addr_remove_xrefs(void)
{
// struct Address *mutt_addr_remove_xrefs(struct Address *a, struct Address *b);
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(mutt_addr_remove_xrefs(NULL, &addr) == NULL);
+ }
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(mutt_addr_remove_xrefs(&addr, NULL) == NULL);
+ }
}
void test_mutt_addr_search(void)
{
// bool mutt_addr_search(struct Address *a, struct Address *lst);
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_search(NULL, &addr));
+ }
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(!mutt_addr_search(&addr, NULL));
+ }
}
void test_mutt_addr_set_intl(void)
{
// void mutt_addr_set_intl(struct Address *a, char *intl_mailbox);
+
+ {
+ mutt_addr_set_intl(NULL, "apple");
+ TEST_CHECK_(1, "mutt_addr_set_intl(NULL, \"apple\")");
+ }
+
+ {
+ struct Address addr = { 0 };
+ mutt_addr_set_intl(&addr, NULL);
+ TEST_CHECK_(1, "mutt_addr_set_intl(&addr, NULL)");
+ }
}
void test_mutt_addr_set_local(void)
{
// void mutt_addr_set_local(struct Address *a, char *local_mailbox);
+
+ {
+ mutt_addr_set_local(NULL, "apple");
+ TEST_CHECK_(1, "mutt_addr_set_local(NULL, \"apple\")");
+ }
+
+ {
+ struct Address addr = { 0 };
+ mutt_addr_set_local(&addr, NULL);
+ TEST_CHECK_(1, "mutt_addr_set_local(&addr, NULL)");
+ }
}
void test_mutt_addr_valid_msgid(void)
{
// bool mutt_addr_valid_msgid(const char *msgid);
+
+ {
+ TEST_CHECK(!mutt_addr_valid_msgid(NULL));
+ }
}
void test_mutt_addr_write(void)
{
// size_t mutt_addr_write(char *buf, size_t buflen, struct Address *addr, bool display);
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(mutt_addr_write(NULL, 32, &addr, false) == 0);
+ }
+
+ {
+ char buf[32] = { 0 };
+ TEST_CHECK(mutt_addr_write(buf, sizeof(buf), NULL, false) == 0);
+ }
}
void test_mutt_addr_write_single(void)
{
// void mutt_addr_write_single(char *buf, size_t buflen, struct Address *addr, bool display);
+
+ {
+ struct Address addr = { 0 };
+ mutt_addr_write_single(NULL, 32, &addr, false);
+ TEST_CHECK_(1, "mutt_addr_write_single(NULL, 32, &addr, false)");
+ }
+
+ {
+ char buf[32] = { 0 };
+ mutt_addr_write_single(buf, sizeof(buf), NULL, false);
+ TEST_CHECK_(1, "mutt_addr_write_single(buf, sizeof(buf), NULL, false)");
+ }
}
void test_mutt_addrlist_to_intl(void)
{
// int mutt_addrlist_to_intl(struct Address *a, char **err);
+
+ {
+ char *err = NULL;
+ TEST_CHECK(mutt_addrlist_to_intl(NULL, &err) == 0);
+ }
+
+ {
+ struct Address addr = { 0 };
+ TEST_CHECK(mutt_addrlist_to_intl(&addr, NULL) == 0);
+ }
}
void test_mutt_addrlist_to_local(void)
{
// int mutt_addrlist_to_local(struct Address *a);
+
+ {
+ TEST_CHECK(mutt_addrlist_to_local(NULL) == 0);
+ }
}