summaryrefslogtreecommitdiffstats
path: root/osi/test/config_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'osi/test/config_test.cpp')
-rw-r--r--osi/test/config_test.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/osi/test/config_test.cpp b/osi/test/config_test.cpp
index 70e5a2494..0419ddc1c 100644
--- a/osi/test/config_test.cpp
+++ b/osi/test/config_test.cpp
@@ -80,6 +80,19 @@ TEST_F(ConfigTest, config_free_null) {
config_free(NULL);
}
+TEST_F(ConfigTest, config_new_clone) {
+ config_t *config = config_new(CONFIG_FILE);
+ config_t *clone = config_new_clone(config);
+
+ config_set_string(clone, CONFIG_DEFAULT_SECTION, "first_key", "not_value");
+
+ EXPECT_STRNE(config_get_string(config, CONFIG_DEFAULT_SECTION, "first_key", "one"),
+ config_get_string(clone, CONFIG_DEFAULT_SECTION, "first_key", "one"));
+
+ config_free(config);
+ config_free(clone);
+}
+
TEST_F(ConfigTest, config_has_section) {
config_t *config = config_new(CONFIG_FILE);
EXPECT_TRUE(config_has_section(config, "DID"));