void test_mutt_auto_subscribe(void)
{
// void mutt_auto_subscribe(const char *mailto);
+
+ {
+ mutt_auto_subscribe(NULL);
+ TEST_CHECK_(1, "mutt_auto_subscribe(NULL)");
+ }
}
void test_mutt_check_encoding(void)
{
// int mutt_check_encoding(const char *c);
+
+ {
+ TEST_CHECK(mutt_check_encoding(NULL) == 0);
+ }
}
void test_mutt_check_mime_type(void)
{
// int mutt_check_mime_type(const char *s);
+
+ {
+ TEST_CHECK(mutt_check_mime_type(NULL) == 0);
+ }
}
void test_mutt_extract_message_id(void)
{
// char *mutt_extract_message_id(const char *s, const char **saveptr);
+
+ {
+ const char *saveptr = NULL;
+ TEST_CHECK(!mutt_extract_message_id(NULL, &saveptr));
+ }
+
+ {
+ TEST_CHECK(!mutt_extract_message_id("apple", NULL));
+ }
}
void test_mutt_is_message_type(void)
{
// bool mutt_is_message_type(int type, const char *subtype);
+
+ {
+ TEST_CHECK(!mutt_is_message_type(0, NULL));
+ }
}
void test_mutt_matches_ignore(void)
{
// bool mutt_matches_ignore(const char *s);
+
+ {
+ TEST_CHECK(!mutt_matches_ignore(NULL));
+ }
}
void test_mutt_parse_content_type(void)
{
// void mutt_parse_content_type(const char *s, struct Body *ct);
+
+ {
+ struct Body body = { 0 };
+ mutt_parse_content_type(NULL, &body);
+ TEST_CHECK_(1, "mutt_parse_content_type(NULL, &body)");
+ }
+
+ {
+ mutt_parse_content_type("apple", NULL);
+ TEST_CHECK_(1, "mutt_parse_content_type(\"apple\", NULL)");
+ }
}
void test_mutt_parse_mailto(void)
{
// int mutt_parse_mailto(struct Envelope *e, char **body, const char *src);
+
+ {
+ char *body = NULL;
+ TEST_CHECK(mutt_parse_mailto(NULL, &body, "apple") != 0);
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ TEST_CHECK(mutt_parse_mailto(&envelope, NULL, "apple") != 0);
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ char *body = NULL;
+ TEST_CHECK(mutt_parse_mailto(&envelope, &body, NULL) != 0);
+ }
}
void test_mutt_parse_multipart(void)
{
// struct Body *mutt_parse_multipart(FILE *fp, const char *boundary, off_t end_off, bool digest);
+
+ {
+ TEST_CHECK(!mutt_parse_multipart(NULL, "apple", 0, false));
+ }
+
+ {
+ FILE fp = { 0 };
+ TEST_CHECK(!mutt_parse_multipart(&fp, NULL, 0, false));
+ }
}
void test_mutt_parse_part(void)
{
// void mutt_parse_part(FILE *fp, struct Body *b);
+
+ {
+ struct Body body = { 0 };
+ mutt_parse_part(NULL, &body);
+ TEST_CHECK_(1, "mutt_parse_part(NULL, &body)");
+ }
+
+ {
+ FILE fp = { 0 };
+ mutt_parse_part(&fp, NULL);
+ TEST_CHECK_(1, "mutt_parse_part(&fp, NULL)");
+ }
}
void test_mutt_read_mime_header(void)
{
// struct Body *mutt_read_mime_header(FILE *fp, bool digest);
+
+ {
+ TEST_CHECK(!mutt_read_mime_header(NULL, false));
+ }
}
void test_mutt_rfc822_parse_line(void)
{
// int mutt_rfc822_parse_line(struct Envelope *env, struct Email *e, char *line, char *p, bool user_hdrs, bool weed, bool do_2047);
+
+ {
+ struct Email email = { 0 };
+ TEST_CHECK(mutt_rfc822_parse_line(NULL, &email, "apple", "banana", false, false, false) == 0);
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ TEST_CHECK(mutt_rfc822_parse_line(&envelope, NULL, "apple", "banana", false, false, false) == 0);
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ struct Email email = { 0 };
+ TEST_CHECK(mutt_rfc822_parse_line(&envelope, &email, NULL, "banana", false, false, false) == 0);
+ }
+
+ {
+ struct Envelope envelope = { 0 };
+ struct Email email = { 0 };
+ TEST_CHECK(mutt_rfc822_parse_line(&envelope, &email, "apple", NULL, false, false, false) == 0);
+ }
}
void test_mutt_rfc822_parse_message(void)
{
// struct Body *mutt_rfc822_parse_message(FILE *fp, struct Body *parent);
+
+ {
+ struct Body body = { 0 };
+ TEST_CHECK(!mutt_rfc822_parse_message(NULL, &body));
+ }
+
+ {
+ FILE fp = { 0 };
+ TEST_CHECK(!mutt_rfc822_parse_message(&fp, NULL));
+ }
}
void test_mutt_rfc822_read_header(void)
{
// struct Envelope *mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed);
+
+ {
+ struct Email email = { 0 };
+ TEST_CHECK(!mutt_rfc822_read_header(NULL, &email, false, false));
+ }
+
+ {
+ FILE *fp = fopen("/dev/null", "r");
+ TEST_CHECK(mutt_rfc822_read_header(fp, NULL, false, false) != NULL);
+ fclose(fp);
+ }
}
void test_mutt_rfc822_read_line(void)
{
// char *mutt_rfc822_read_line(FILE *fp, char *line, size_t *linelen);
+
+ {
+ size_t linelen = 0;
+ TEST_CHECK(!mutt_rfc822_read_line(NULL, "apple", &linelen));
+ }
+
+ {
+ FILE fp = { 0 };
+ size_t linelen = 0;
+ TEST_CHECK(!mutt_rfc822_read_line(&fp, NULL, &linelen));
+ }
+
+ {
+ FILE fp = { 0 };
+ TEST_CHECK(!mutt_rfc822_read_line(&fp, "apple", NULL));
+ }
}