From: Richard Russon Date: Sun, 26 May 2019 15:02:24 +0000 (+0100) Subject: test: improve test_mutt_str_strcasecmp() X-Git-Tag: 2019-10-25~187^2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1be4ef9b943142422c82b025f7fd9c9d011d8f71;p=neomutt test: improve test_mutt_str_strcasecmp() --- diff --git a/test/string/mutt_str_strcasecmp.c b/test/string/mutt_str_strcasecmp.c index 6d01db4a7..e65d6d0e0 100644 --- a/test/string/mutt_str_strcasecmp.c +++ b/test/string/mutt_str_strcasecmp.c @@ -29,15 +29,15 @@ void test_mutt_str_strcasecmp(void) { // int mutt_str_strcasecmp(const char *a, const char *b); - { - TEST_CHECK(mutt_str_strcasecmp(NULL, "apple") != 0); - } + TEST_CHECK(mutt_str_strcasecmp(NULL, "apple") != 0); + TEST_CHECK(mutt_str_strcasecmp("apple", NULL) != 0); + TEST_CHECK(mutt_str_strcasecmp(NULL, NULL) == 0); - { - TEST_CHECK(mutt_str_strcasecmp("apple", NULL) != 0); - } + TEST_CHECK(mutt_str_strcasecmp("", "") == 0); - { - TEST_CHECK(mutt_str_strcasecmp(NULL, NULL) == 0); - } + TEST_CHECK(mutt_str_strcasecmp("apple", "apple") == 0); + TEST_CHECK(mutt_str_strcasecmp("apple", "APPLE") == 0); + + TEST_CHECK(mutt_str_strcasecmp("apple", "apple2") != 0); + TEST_CHECK(mutt_str_strcasecmp("apple1", "apple") != 0); }