diff options
author | Colin Walters <walters@verbum.org> | 2019-11-07 16:06:39 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2019-11-07 21:15:41 +0000 |
commit | 58980a717a7854b27f48a0753dfbe5b8b94c8164 (patch) | |
tree | cc79ff90da84950b80bb247fdecedfce796bfb65 /tests/test-keyfile-utils.c | |
parent | cb3eff6cfa0c0fba9e7e5d74eb7aac2a88666463 (diff) | |
download | ostree-58980a717a7854b27f48a0753dfbe5b8b94c8164.tar.gz |
lib/keyfile: Treat "group not found" the same as "key not found"
Prep for fsverity, where I want to create a new group
`[fsverity]` in the keyfile that has default values. We should
treat the absence of a group the same as absence of a key
in these "with defaults" APIs.
Diffstat (limited to 'tests/test-keyfile-utils.c')
-rw-r--r-- | tests/test-keyfile-utils.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/test-keyfile-utils.c b/tests/test-keyfile-utils.c index c580f81c..3014cf16 100644 --- a/tests/test-keyfile-utils.c +++ b/tests/test-keyfile-utils.c @@ -60,12 +60,12 @@ test_get_boolean_with_default (void) g_assert_true (out); g_clear_error (&error); - g_assert_false (ot_keyfile_get_boolean_with_default (g_keyfile, - "a_fake_section", - "a_boolean_true", - FALSE, - &out, - &error)); + g_assert (ot_keyfile_get_boolean_with_default (g_keyfile, + "a_fake_section", + "a_boolean_true", + FALSE, + &out, + &error)); } static void @@ -122,13 +122,13 @@ test_get_value_with_default (void) g_assert_cmpstr (out, ==, "correct"); g_clear_pointer (&out, g_free); - g_assert_false (ot_keyfile_get_value_with_default (g_keyfile, - "a_fake_section", - "a_value_true", - "no value", - &out, - &error)); - g_clear_error (&error); + g_assert (ot_keyfile_get_value_with_default (g_keyfile, + "a_fake_section", + "a_value_true", + "no value", + &out, + &error)); + g_assert_cmpstr (out, ==, "no value"); g_clear_pointer (&out, g_free); } |