mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 20:06:18 +01:00
glib: unicode: add some empty string tests
This commit is contained in:
parent
deb495de42
commit
6b39af34aa
@ -459,6 +459,10 @@ test_strup (void)
|
|||||||
/* Tricky, comparing two unicode strings with an ASCII function */
|
/* Tricky, comparing two unicode strings with an ASCII function */
|
||||||
g_assert_cmpstr (str_up, ==, "AAZZ09X;\003E\357\274\241\357\274\241");
|
g_assert_cmpstr (str_up, ==, "AAZZ09X;\003E\357\274\241\357\274\241");
|
||||||
g_free (str_up);
|
g_free (str_up);
|
||||||
|
|
||||||
|
str_up = g_utf8_strup ("", 0);
|
||||||
|
g_assert_cmpstr (str_up, ==, "");
|
||||||
|
g_free (str_up);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test that g_utf8_strdown() returns the correct value for various
|
/* Test that g_utf8_strdown() returns the correct value for various
|
||||||
@ -484,6 +488,10 @@ test_strdown (void)
|
|||||||
/* Tricky, comparing two unicode strings with an ASCII function */
|
/* Tricky, comparing two unicode strings with an ASCII function */
|
||||||
g_assert_cmpstr (str_down, ==, "aazz09x;\003\007\357\275\201\357\275\201");
|
g_assert_cmpstr (str_down, ==, "aazz09x;\003\007\357\275\201\357\275\201");
|
||||||
g_free (str_down);
|
g_free (str_down);
|
||||||
|
|
||||||
|
str_down = g_utf8_strdown ("", 0);
|
||||||
|
g_assert_cmpstr (str_down, ==, "");
|
||||||
|
g_free (str_down);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test that g_utf8_strup() and g_utf8_strdown() return the correct
|
/* Test that g_utf8_strup() and g_utf8_strdown() return the correct
|
||||||
@ -576,6 +584,10 @@ test_casefold (void)
|
|||||||
/* Tricky, comparing two unicode strings with an ASCII function */
|
/* Tricky, comparing two unicode strings with an ASCII function */
|
||||||
g_assert_cmpstr (str_casefold, ==, "aazz09x;\357\275\201\357\275\201");
|
g_assert_cmpstr (str_casefold, ==, "aazz09x;\357\275\201\357\275\201");
|
||||||
g_free (str_casefold);
|
g_free (str_casefold);
|
||||||
|
|
||||||
|
str_casefold = g_utf8_casefold ("", 0);
|
||||||
|
g_assert_cmpstr (str_casefold, ==, "");
|
||||||
|
g_free (str_casefold);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user