test-awful-client.lua: Fix indentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
a1b5782e90
commit
edff48f133
|
@ -108,21 +108,21 @@ table.insert(steps, function()
|
|||
end)
|
||||
|
||||
table.insert(steps, function()
|
||||
-- The request should have been denied
|
||||
assert(client.focus == c2)
|
||||
-- The request should have been denied
|
||||
assert(client.focus == c2)
|
||||
|
||||
-- Test the remove function
|
||||
awful.ewmh.remove_activate_filter(function() end)
|
||||
-- Test the remove function
|
||||
awful.ewmh.remove_activate_filter(function() end)
|
||||
|
||||
awful.ewmh.add_activate_filter(awful.ewmh.generic_activate_filters[1])
|
||||
awful.ewmh.add_activate_filter(awful.ewmh.generic_activate_filters[1])
|
||||
|
||||
awful.ewmh.remove_activate_filter(awful.ewmh.generic_activate_filters[1])
|
||||
awful.ewmh.remove_activate_filter(awful.ewmh.generic_activate_filters[1])
|
||||
|
||||
assert(original_count == #awful.ewmh.generic_activate_filters)
|
||||
assert(original_count == #awful.ewmh.generic_activate_filters)
|
||||
|
||||
c1:emit_signal("request::activate", "i_said_so")
|
||||
c1:emit_signal("request::activate", "i_said_so")
|
||||
|
||||
return client.focus == c1
|
||||
return client.focus == c1
|
||||
end)
|
||||
|
||||
local has_error
|
||||
|
@ -234,91 +234,91 @@ table.insert(multi_screen_steps, function()
|
|||
end)
|
||||
|
||||
table.insert(multi_screen_steps, function()
|
||||
if #client.get() ~= screen.count() then return end
|
||||
if #client.get() ~= screen.count() then return end
|
||||
|
||||
for _, c in ipairs(client.get()) do
|
||||
assert(#c:tags() == 1)
|
||||
assert(c.first_tag.name == "NEW_AT_"..c.screen.index)
|
||||
end
|
||||
for _, c in ipairs(client.get()) do
|
||||
assert(#c:tags() == 1)
|
||||
assert(c.first_tag.name == "NEW_AT_"..c.screen.index)
|
||||
end
|
||||
|
||||
-- Kill the client
|
||||
for _, c in ipairs(client.get()) do
|
||||
c:kill()
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
||||
table.insert(multi_screen_steps, function()
|
||||
if #client.get() == 0 then
|
||||
-- Kill the client
|
||||
for _, c in ipairs(client.get()) do
|
||||
c:kill()
|
||||
end
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
||||
table.insert(multi_screen_steps, function()
|
||||
if #client.get() == 0 then
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
||||
table.insert(multi_screen_steps, function()
|
||||
|
||||
if screen.count() < 2 then return true end
|
||||
if screen.count() < 2 then return true end
|
||||
|
||||
-- Now, add client where the target tag and screen don't match
|
||||
test_client("test_tag1", nil, {
|
||||
tag = screen[2].tags[2],
|
||||
screen = screen[1],
|
||||
})
|
||||
-- Now, add client where the target tag and screen don't match
|
||||
test_client("test_tag1", nil, {
|
||||
tag = screen[2].tags[2],
|
||||
screen = screen[1],
|
||||
})
|
||||
|
||||
-- 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] },
|
||||
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] },
|
||||
screen = screen[2],
|
||||
})
|
||||
|
||||
-- Identical, but using the tag names
|
||||
test_client("test_tags2", nil, {
|
||||
tags = { "3", "4" },
|
||||
screen = screen[2],
|
||||
})
|
||||
-- Identical, but using the tag names
|
||||
test_client("test_tags2", nil, {
|
||||
tags = { "3", "4" },
|
||||
screen = screen[2],
|
||||
})
|
||||
|
||||
-- Also test tags, but with an invalid screen array
|
||||
test_client("test_tags3", nil, {
|
||||
tags = { screen[2].tags[3], screen[1].tags[4] },
|
||||
screen = screen[1],
|
||||
})
|
||||
-- Also test tags, but with an invalid screen array
|
||||
test_client("test_tags3", nil, {
|
||||
tags = { screen[2].tags[3], screen[1].tags[4] },
|
||||
screen = screen[1],
|
||||
})
|
||||
|
||||
-- Another test for tags, but with no matching names
|
||||
test_client("test_tags4", nil, {
|
||||
tags = { "foobar", "bobcat" },
|
||||
screen = screen[1],
|
||||
})
|
||||
-- Another test for tags, but with no matching names
|
||||
test_client("test_tags4", nil, {
|
||||
tags = { "foobar", "bobcat" },
|
||||
screen = screen[1],
|
||||
})
|
||||
|
||||
return true
|
||||
return true
|
||||
end)
|
||||
|
||||
|
||||
table.insert(multi_screen_steps, function()
|
||||
if screen.count() < 2 then return true end
|
||||
if #client.get() ~= 5 then return end
|
||||
if screen.count() < 2 then return true end
|
||||
if #client.get() ~= 5 then return end
|
||||
|
||||
local c_by_class = {}
|
||||
local c_by_class = {}
|
||||
|
||||
for _, c in ipairs(client.get()) do
|
||||
c_by_class[c.class] = c
|
||||
end
|
||||
for _, c in ipairs(client.get()) do
|
||||
c_by_class[c.class] = c
|
||||
end
|
||||
|
||||
assert(c_by_class["test_tag1"].screen == screen[2])
|
||||
assert(#c_by_class["test_tag1"]:tags() == 1)
|
||||
assert(c_by_class["test_tag1"].screen == screen[2])
|
||||
assert(#c_by_class["test_tag1"]:tags() == 1)
|
||||
|
||||
assert(c_by_class["test_tags1"].screen == screen[1])
|
||||
assert(#c_by_class["test_tags1"]:tags() == 2)
|
||||
assert(c_by_class["test_tags1"].screen == screen[1])
|
||||
assert(#c_by_class["test_tags1"]:tags() == 2)
|
||||
|
||||
assert(c_by_class["test_tags2"].screen == screen[2])
|
||||
assert(#c_by_class["test_tags2"]:tags() == 2)
|
||||
assert(c_by_class["test_tags2"].screen == screen[2])
|
||||
assert(#c_by_class["test_tags2"]:tags() == 2)
|
||||
|
||||
assert(c_by_class["test_tags3"].screen == screen[2])
|
||||
assert(#c_by_class["test_tags3"]:tags() == 1)
|
||||
assert(c_by_class["test_tags3"].screen == screen[2])
|
||||
assert(#c_by_class["test_tags3"]:tags() == 1)
|
||||
|
||||
assert(c_by_class["test_tags4"].screen == screen[1])
|
||||
assert(#c_by_class["test_tags4"]:tags() == 1)
|
||||
assert(c_by_class["test_tags4"]:tags()[1] == screen[1].selected_tag)
|
||||
assert(c_by_class["test_tags4"].screen == screen[1])
|
||||
assert(#c_by_class["test_tags4"]:tags() == 1)
|
||||
assert(c_by_class["test_tags4"]:tags()[1] == screen[1].selected_tag)
|
||||
|
||||
return true
|
||||
return true
|
||||
end)
|
||||
|
||||
require("_multi_screen")(steps, multi_screen_steps)
|
||||
|
|
Loading…
Reference in New Issue