mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Make passing NULL for new_prefix work as documented. (#338845, Yevgen
2006-04-17 Matthias Clasen <mclasen@redhat.com> * glib/gcompletion.c (g_completion_complete_utf8): Make passing NULL for new_prefix work as documented. (#338845, Yevgen Muntyan) * tests/completion-test.c: Test that passing NULL for new_prefix in g_completion_complete_utf8 works.
This commit is contained in:
committed by
Matthias Clasen
parent
31db06fc99
commit
f16f2764f4
@@ -44,20 +44,30 @@ int main (int argc, char *argv[])
|
||||
|
||||
items = g_completion_complete (cmp, "a", &prefix);
|
||||
g_assert (!strcmp ("a\302", prefix));
|
||||
g_assert (g_list_length (items) == 2);
|
||||
g_free (prefix);
|
||||
|
||||
items = g_completion_complete_utf8 (cmp, "a", &prefix);
|
||||
g_assert (!strcmp ("a", prefix));
|
||||
g_assert (g_list_length (items) == 2);
|
||||
g_free (prefix);
|
||||
|
||||
items = g_completion_complete (cmp, "b", &prefix);
|
||||
g_assert (!strcmp ("b", prefix));
|
||||
g_assert (g_list_length (items) == 2);
|
||||
g_free (prefix);
|
||||
|
||||
items = g_completion_complete_utf8 (cmp, "b", &prefix);
|
||||
g_assert (!strcmp ("b", prefix));
|
||||
g_assert (g_list_length (items) == 2);
|
||||
g_free (prefix);
|
||||
|
||||
items = g_completion_complete (cmp, "a", NULL);
|
||||
g_assert (g_list_length (items) == 2);
|
||||
|
||||
items = g_completion_complete_utf8 (cmp, "a", NULL);
|
||||
g_assert (g_list_length (items) == 2);
|
||||
|
||||
g_completion_free (cmp);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user