tests: Make sure clients really end up on the right screen

Prevent #1482 from regressing
This commit is contained in:
Emmanuel Lepage Vallee 2017-01-28 17:03:36 -05:00
parent 74508098de
commit 23d9727590
1 changed files with 12 additions and 1 deletions

View File

@ -296,6 +296,12 @@ table.insert(multi_screen_steps, function()
screen = screen[1], 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 -- Add a client with multiple tags on the same screen, but not c.screen
test_client("test_tags1", nil, { test_client("test_tags1", nil, {
tags = { screen[1].tags[3], screen[1].tags[4] }, tags = { screen[1].tags[3], screen[1].tags[4] },
@ -326,7 +332,7 @@ end)
table.insert(multi_screen_steps, function() table.insert(multi_screen_steps, function()
if screen.count() < 2 then return true end 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 = {} 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"].screen == screen[2])
assert(#c_by_class["test_tag1"]:tags() == 1) 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"].screen == screen[1])
assert(#c_by_class["test_tags1"]:tags() == 2) assert(#c_by_class["test_tags1"]:tags() == 2)