struct Address addr = { 0 };
TEST_CHECK(!mutt_addr_cmp(&addr, NULL));
}
+
+ {
+ struct Address a1 = { .mailbox = "test@example.com" };
+ struct Address a2 = { .mailbox = "test@example.com" };
+ TEST_CHECK(mutt_addr_cmp(&a1, &a2));
+ }
+
+ {
+ struct Address a1 = { .mailbox = "test@example.com" };
+ struct Address a2 = { .mailbox = "TEST@example.COM" };
+ TEST_CHECK(mutt_addr_cmp(&a1, &a2));
+ }
+
+ {
+ struct Address a1 = { .mailbox = "test@example.com" };
+ struct Address a2 = { .mailbox = "test@example.com.org" };
+ TEST_CHECK(!mutt_addr_cmp(&a1, &a2));
+ }
}