test:Add test for output config with multiple exclusion/wildcard

This commit is contained in:
Paul Riou 2023-03-13 00:49:18 +00:00
parent 90206f55be
commit c26849217e
2 changed files with 6 additions and 1 deletions

View File

@ -31,7 +31,7 @@ TEST_CASE("Load config with multiple bars", "[config]") {
SECTION("select multiple configs #1") {
auto data = conf.getOutputConfigs("DP-0", "Fake DisplayPort output #0");
REQUIRE(data.size() == 3);
REQUIRE(data.size() == 4);
REQUIRE(data[0]["layer"].asString() == "bottom");
REQUIRE(data[0]["height"].asInt() == 20);
REQUIRE(data[1]["layer"].asString() == "top");
@ -40,6 +40,7 @@ TEST_CASE("Load config with multiple bars", "[config]") {
REQUIRE(data[2]["layer"].asString() == "overlay");
REQUIRE(data[2]["position"].asString() == "right");
REQUIRE(data[2]["height"].asInt() == 23);
REQUIRE(data[3]["height"].asInt() == 24);
}
SECTION("select multiple configs #2") {
auto data = conf.getOutputConfigs("HDMI-0", "Fake HDMI output #0");

View File

@ -21,5 +21,9 @@
"layer": "overlay",
"height": 23,
"output": "!HDMI-1"
},
{
"height": 24,
"output": ["!HDMI-0", "!HDMI-1", "*"]
}
]