mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
applied fix for bug #476840.
2007-09-14 15:07:28 Tim Janik <timj@gtk.org> * glib/gutf8.c (g_utf8_strreverse): applied fix for bug #476840. * tests/utf8-pointer.c (test_misc): added test for g_utf8_strreverse(). svn path=/trunk/; revision=5757
This commit is contained in:
committed by
Tim Janik
parent
f2ee7ca6e8
commit
63828ea746
@@ -90,10 +90,23 @@ test_length (void)
|
||||
g_assert (g_utf8_strlen ("a\340\250\201c", 5) == 3);
|
||||
}
|
||||
|
||||
static void
|
||||
test_misc (void)
|
||||
{
|
||||
char *s;
|
||||
s = g_utf8_strreverse ("1234", -1);
|
||||
g_assert (strcmp (s, "4321") == 0);
|
||||
g_free (s);
|
||||
s = g_utf8_strreverse ("1234", 3);
|
||||
g_assert (strcmp (s, "321") == 0);
|
||||
g_free (s);
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
test_utf8 (longline);
|
||||
test_length ();
|
||||
|
||||
test_misc ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user