From c26849217e23b1698e889fd91186158ecbd8dad2 Mon Sep 17 00:00:00 2001 From: Paul Riou Date: Mon, 13 Mar 2023 00:49:18 +0000 Subject: [PATCH] test:Add test for output config with multiple exclusion/wildcard --- test/config.cpp | 3 ++- test/config/multi.json | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/config.cpp b/test/config.cpp index 3d0f007..ad3df06 100644 --- a/test/config.cpp +++ b/test/config.cpp @@ -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"); diff --git a/test/config/multi.json b/test/config/multi.json index ed43a39..06f6ae2 100644 --- a/test/config/multi.json +++ b/test/config/multi.json @@ -21,5 +21,9 @@ "layer": "overlay", "height": 23, "output": "!HDMI-1" + }, + { + "height": 24, + "output": ["!HDMI-0", "!HDMI-1", "*"] } ]