From 4965cbd238742c05121e9e36c208bf4505b9f14c Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Sun, 26 May 2019 16:02:24 +0100 Subject: [PATCH] test: improve test_mutt_str_strlower() --- test/string/mutt_str_strlower.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/string/mutt_str_strlower.c b/test/string/mutt_str_strlower.c index 6e7714310..f91afcd22 100644 --- a/test/string/mutt_str_strlower.c +++ b/test/string/mutt_str_strlower.c @@ -32,4 +32,22 @@ void test_mutt_str_strlower(void) { TEST_CHECK(mutt_str_strlower(NULL) == NULL); } + + { + char buf[64] = ""; + mutt_str_strlower(buf); + TEST_CHECK(strcmp(buf, "") == 0); + } + + { + char buf[64] = "apple"; + mutt_str_strlower(buf); + TEST_CHECK(strcmp(buf, "apple") == 0); + } + + { + char buf[64] = "aPPLe"; + mutt_str_strlower(buf); + TEST_CHECK(strcmp(buf, "apple") == 0); + } } -- 2.40.0