diff --git a/glib/tests/strfuncs.c b/glib/tests/strfuncs.c index 9b2d1d652..8e376f740 100644 --- a/glib/tests/strfuncs.c +++ b/glib/tests/strfuncs.c @@ -567,6 +567,13 @@ test_strreverse (void) g_free (str); } +static void +test_strncasecmp (void) +{ + g_assert (g_strncasecmp ("abc1", "ABC2", 3) == 0); + g_assert (g_strncasecmp ("abc1", "ABC2", 4) != 0); +} + static void test_strstr (void) { @@ -1340,6 +1347,7 @@ main (int argc, g_test_add_func ("/strfuncs/strchug", test_strchug); g_test_add_func ("/strfuncs/strchomp", test_strchomp); g_test_add_func ("/strfuncs/strreverse", test_strreverse); + g_test_add_func ("/strfuncs/strncasecmp", test_strncasecmp); g_test_add_func ("/strfuncs/strstr", test_strstr); g_test_add_func ("/strfuncs/has-prefix", test_has_prefix); g_test_add_func ("/strfuncs/has-suffix", test_has_suffix);