summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
author15:07:28 Tim Janik <timj@gtk.org>2007-09-14 13:28:07 +0000
committerTim Janik <timj@src.gnome.org>2007-09-14 13:28:07 +0000
commit63828ea746a2227f793937a242d7fbb9c09ec4da (patch)
treeab7aa6349e2146d465eb2e920fb8d0c6cb7602b4 /tests
parentf2ee7ca6e8d44dc69842e1e90aead165f1c71e58 (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/utf8-pointer.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/utf8-pointer.c b/tests/utf8-pointer.c
index 6ac256641..91df96ec4 100644
--- a/tests/utf8-pointer.c
+++ b/tests/utf8-pointer.c
@@ -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;
}