[glib] keyfile tests: Add testcase for bug #634232
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] keyfile tests: Add testcase for bug #634232
- Date: Tue, 24 Jan 2012 22:17:50 +0000 (UTC)
commit 26d4feae0cc900bdb56af490176d30025cd0bba6
Author: Ryan Lortie <desrt desrt ca>
Date: Tue Jan 24 16:59:59 2012 -0500
keyfile tests: Add testcase for bug #634232
Add a testcase based on one by Alfredo Dal'Ava JÃnior (the original
reporter of the bug).
https://bugzilla.gnome.org/show_bug.cgi?id=634232
glib/tests/keyfile.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/keyfile.c b/glib/tests/keyfile.c
index 6d2f001..aac47fb 100644
--- a/glib/tests/keyfile.c
+++ b/glib/tests/keyfile.c
@@ -1418,6 +1418,20 @@ test_ref (void)
g_key_file_unref (file);
}
+/* https://bugzilla.gnome.org/show_bug.cgi?id=634232 */
+static void
+test_replace_value (void)
+{
+ GKeyFile *keyfile;
+
+ keyfile = g_key_file_new();
+ g_key_file_set_value(keyfile, "grupo1", "chave1", "1234567890");
+ g_key_file_set_value(keyfile, "grupo1", "chave1", "123123423423423432432423423");
+ g_key_file_remove_group(keyfile, "grupo1", NULL);
+ g_free (g_key_file_to_data (keyfile, NULL, NULL));
+ g_key_file_unref (keyfile);
+}
+
int
main (int argc, char *argv[])
{
@@ -1450,6 +1464,7 @@ main (int argc, char *argv[])
g_test_add_func ("/keyfile/non-utf8", test_non_utf8);
g_test_add_func ("/keyfile/page-boundary", test_page_boundary);
g_test_add_func ("/keyfile/ref", test_ref);
+ g_test_add_func ("/keyfile/replace-value", test_replace_value);
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]