mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor(config): more sensible multi-bar include behavior
This commit is contained in:
@ -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");
|
||||
|
@ -1,9 +1,4 @@
|
||||
[
|
||||
{
|
||||
"output": "OUT-0",
|
||||
"height": 20
|
||||
},
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
]
|
||||
{
|
||||
"output": "OUT-0",
|
||||
"height": 20
|
||||
}
|
||||
|
@ -1,8 +1,3 @@
|
||||
[
|
||||
{},
|
||||
{
|
||||
"height": 21
|
||||
},
|
||||
{},
|
||||
{}
|
||||
]
|
||||
{
|
||||
"height": 21
|
||||
}
|
||||
|
@ -1,9 +1,4 @@
|
||||
[
|
||||
{},
|
||||
{},
|
||||
{
|
||||
"output": "OUT-1",
|
||||
"height": 22
|
||||
},
|
||||
{}
|
||||
]
|
||||
{
|
||||
"output": "OUT-1",
|
||||
"height": 22
|
||||
}
|
||||
|
@ -1,8 +1,3 @@
|
||||
[
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{
|
||||
"height": 23
|
||||
}
|
||||
]
|
||||
{
|
||||
"height": 23
|
||||
}
|
||||
|
@ -1,9 +1,4 @@
|
||||
[
|
||||
{},
|
||||
{},
|
||||
{},
|
||||
{
|
||||
"output": "OUT-3",
|
||||
"include": "test/config/include-multi-3-0.json"
|
||||
}
|
||||
]
|
||||
{
|
||||
"output": "OUT-3",
|
||||
"include": "test/config/include-multi-3-0.json"
|
||||
}
|
||||
|
Reference in New Issue
Block a user