+2005-09-14 Matthias Clasen <mclasen@redhat.com>
+
+ * tests/keyfile-test.c: Add a test for grup names of length 1.
+
+ * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
+ of length 1. (#316309)
+
2005-09-12 Matthias Clasen <mclasen@redhat.com>
* glib/gmarkup.c (g_markup_escape_text): Clarify docs.
+2005-09-14 Matthias Clasen <mclasen@redhat.com>
+
+ * tests/keyfile-test.c: Add a test for grup names of length 1.
+
+ * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
+ of length 1. (#316309)
+
2005-09-12 Matthias Clasen <mclasen@redhat.com>
* glib/gmarkup.c (g_markup_escape_text): Clarify docs.
+2005-09-14 Matthias Clasen <mclasen@redhat.com>
+
+ * tests/keyfile-test.c: Add a test for grup names of length 1.
+
+ * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
+ of length 1. (#316309)
+
2005-09-12 Matthias Clasen <mclasen@redhat.com>
* glib/gmarkup.c (g_markup_escape_text): Clarify docs.
p = g_utf8_next_char (p);
- if (!*p)
- return FALSE;
-
- p = g_utf8_next_char (p);
-
/* Group name must be non-empty
*/
- if (*p == ']')
+ if (!*p || *p == ']')
return FALSE;
while (*p && *p != ']')
g_key_file_free (keyfile);
}
+static void
+test_groups (void)
+{
+ GKeyFile *keyfile;
+
+ const gchar *data =
+ "[1]\n"
+ "key1=123\n"
+ "[2]\n"
+ "key2=123\n";
+
+ keyfile = load_data (data, 0);
+
+ check_string_value (keyfile, "1", "key1", "123");
+ check_string_value (keyfile, "2", "key2", "123");
+
+ g_key_file_free (keyfile);
+}
+
/* http://bugzilla.gnome.org/show_bug.cgi?id=165887 */
static void
test_group_remove (void)
test_lists ();
test_group_remove ();
test_key_remove ();
+ test_groups ();
return 0;
}