Add a test for the previous change.
authorMatthias Clasen <mclasen@redhat.com>
Wed, 26 Apr 2006 03:12:03 +0000 (03:12 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 26 Apr 2006 03:12:03 +0000 (03:12 +0000)
2006-04-25  Matthias Clasen  <mclasen@redhat.com>

* tests/keyfile-test.c (test_comments): Add a test for
the previous change.

ChangeLog
ChangeLog.pre-2-12
tests/keyfile-test.c

index 37cecba..b6690a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-04-25  Matthias Clasen  <mclasen@redhat.com>
 
+       * tests/keyfile-test.c (test_comments): Add a test for
+       the previous change.
+
        * glib/gkeyfile.c (g_key_file_lookup_group_node): Remove
        redundant code.
        (g_key_file_get_group_comment): Don't dereference before
index 37cecba..b6690a0 100644 (file)
@@ -1,5 +1,8 @@
 2006-04-25  Matthias Clasen  <mclasen@redhat.com>
 
+       * tests/keyfile-test.c (test_comments): Add a test for
+       the previous change.
+
        * glib/gkeyfile.c (g_key_file_lookup_group_node): Remove
        redundant code.
        (g_key_file_get_group_comment): Don't dereference before
index e9ec922..df51d14 100644 (file)
@@ -509,6 +509,12 @@ test_comments (void)
   check_name ("group comment", comment, group_comment, 0);
   g_free (comment);
 
+  comment = g_key_file_get_comment (keyfile, "group3", NULL, &error);
+  check_error (&error, 
+              G_KEY_FILE_ERROR,
+              G_KEY_FILE_ERROR_GROUP_NOT_FOUND);
+  g_assert (comment == NULL);
+
   g_key_file_free (keyfile);
 }