config: support more than 1 window rule per rule line. (#11689)

Adds support for specifying multiple rules in one line
This commit is contained in:
ItsOhen 2025-09-26 00:33:58 +02:00 committed by GitHub
parent 7ce451d20c
commit d8f615751a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 119 additions and 165 deletions

View file

@ -228,6 +228,23 @@ static bool test() {
testSwapWindow();
NLog::log("{}Testing window rules", Colors::YELLOW);
if (!spawnKitty("wr_kitty"))
return false;
{
auto str = getFromSocket("/activewindow");
const int SIZE = 200;
EXPECT_CONTAINS(str, "floating: 1");
EXPECT_CONTAINS(str, std::format("size: {},{}", SIZE, SIZE));
EXPECT_NOT_CONTAINS(str, "pinned: 1");
}
NLog::log("{}Killing all windows", Colors::YELLOW);
Tests::killAllWindows();
NLog::log("{}Expecting 0 windows", Colors::YELLOW);
EXPECT(Tests::windowCount(), 0);
return !ret;
}