From 23d9727590871d18290d8d0d14f16b3909c0ce6c Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sat, 28 Jan 2017 17:03:36 -0500 Subject: [PATCH] tests: Make sure clients really end up on the right screen Prevent #1482 from regressing --- tests/test-awful-client.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test-awful-client.lua b/tests/test-awful-client.lua index dd0b494e..c2b6fed6 100644 --- a/tests/test-awful-client.lua +++ b/tests/test-awful-client.lua @@ -296,6 +296,12 @@ table.insert(multi_screen_steps, function() screen = screen[1], }) + -- Same as previous, but switched + test_client("test_tag2", nil, { + tag = screen[1].tags[5], + screen = screen[2], + }) + -- Add a client with multiple tags on the same screen, but not c.screen test_client("test_tags1", nil, { tags = { screen[1].tags[3], screen[1].tags[4] }, @@ -326,7 +332,7 @@ end) table.insert(multi_screen_steps, function() if screen.count() < 2 then return true end - if #client.get() ~= 5 then return end + if #client.get() ~= 6 then return end local c_by_class = {} @@ -336,6 +342,11 @@ table.insert(multi_screen_steps, function() assert(c_by_class["test_tag1"].screen == screen[2]) assert(#c_by_class["test_tag1"]:tags() == 1) + assert(c_by_class["test_tag1"]:tags()[1] == screen[2].tags[2]) + + assert(c_by_class["test_tag2"].screen == screen[1]) + assert(#c_by_class["test_tag2"]:tags() == 1) + assert(c_by_class["test_tag2"]:tags()[1] == screen[1].tags[5]) assert(c_by_class["test_tags1"].screen == screen[1]) assert(#c_by_class["test_tags1"]:tags() == 2)