1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

tests: split tests on functions string_tolower and string_toupper

This commit is contained in:
Sébastien Helleu
2022-01-14 21:43:06 +01:00
parent f8915129bf
commit 305608ce89
+19 -3
View File
@@ -157,6 +157,23 @@ TEST(CoreString, Strndup)
/*
* Tests functions:
* string_tolower
*/
TEST(CoreString, ToLower)
{
char *str;
str = strdup ("ABC");
string_tolower (NULL);
string_tolower (str);
STRCMP_EQUAL("abc", str);
free (str);
}
/*
* Tests functions:
* string_toupper
*/
@@ -164,10 +181,9 @@ TEST(CoreString, Case)
{
char *str;
str = strdup ("ABC");
str = strdup ("abc");
string_tolower (str);
STRCMP_EQUAL("abc", str);
string_toupper (NULL);
string_toupper (str);
STRCMP_EQUAL("ABC", str);