refactor(config): more sensible multi-bar include behavior

This commit is contained in:
Aleksei Bavshin
2021-09-14 12:16:37 +07:00
parent 8912bd3ed0
commit ccc60b4245
8 changed files with 28 additions and 58 deletions

View File

@ -62,7 +62,8 @@ TEST_CASE("Load simple config with include", "[config]") {
SECTION("validate the config data") {
auto& data = conf.getConfig();
REQUIRE(data["layer"].asString() == "bottom");
// config override behavior: preserve first included value
REQUIRE(data["layer"].asString() == "top");
REQUIRE(data["height"].asInt() == 30);
// config override behavior: preserve value from the top config
REQUIRE(data["position"].asString() == "top");