summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests/main/dwindle.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-03-03 11:55:57 +0000
committerGitHub <noreply@github.com>2026-03-03 11:55:57 +0000
commit3faddf40d08fe00738cfe7b85dc48953c27012bb (patch)
tree1e57d080959e55396fe112c3a9956f4aa0757438 /hyprtester/src/tests/main/dwindle.cpp
parenta6e3a2478cdb01f6e4f2e0821aecda311e1c75a5 (diff)
algo/dwindle: don't crash on empty swapsplit (#13533)
ref https://github.com/hyprwm/Hyprland/discussions/13530
Diffstat (limited to 'hyprtester/src/tests/main/dwindle.cpp')
-rw-r--r--hyprtester/src/tests/main/dwindle.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/hyprtester/src/tests/main/dwindle.cpp b/hyprtester/src/tests/main/dwindle.cpp
index 664a8d73..ef270a62 100644
--- a/hyprtester/src/tests/main/dwindle.cpp
+++ b/hyprtester/src/tests/main/dwindle.cpp
@@ -84,14 +84,13 @@ static void test13349() {
static void testSplit() {
// Test various split methods
- for (auto const& win : {"a", "b"}) {
- if (!Tests::spawnKitty(win)) {
- NLog::log("{}Failed to spawn kitty with win class `{}`", Colors::RED, win);
- ++TESTS_FAILED;
- ret = 1;
- return;
- }
- }
+ Tests::spawnKitty("a");
+
+ // these must not crash
+ EXPECT_NOT(getFromSocket("/dispatch layoutmsg swapsplit"), "ok");
+ EXPECT_NOT(getFromSocket("/dispatch layoutmsg splitratio 1 exact"), "ok");
+
+ Tests::spawnKitty("b");
OK(getFromSocket("/dispatch focuswindow class:a"));
OK(getFromSocket("/dispatch layoutmsg splitratio -0.2"));