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:
15:07:28 Tim Janik
2007-09-14 13:28:07 +00:00
committed by Tim Janik
parent f2ee7ca6e8
commit 63828ea746
3 changed files with 25 additions and 7 deletions

View File

@@ -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;
}