test-awful-placement: Reindent after the previous change
Only whitespace changes and reformatting of comments. Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
This commit is contained in:
parent
9e894d8fdd
commit
1c27f9d227
|
@ -78,8 +78,8 @@ end
|
||||||
-- Repeat testing 3 times.
|
-- Repeat testing 3 times.
|
||||||
for _, _ in ipairs{1, 2, 3} do
|
for _, _ in ipairs{1, 2, 3} do
|
||||||
|
|
||||||
-- The first 100x100 window should be placed at the top left corner.
|
-- The first 100x100 window should be placed at the top left corner.
|
||||||
add_client {
|
add_client {
|
||||||
geometry = function(wa)
|
geometry = function(wa)
|
||||||
return {
|
return {
|
||||||
width = 100,
|
width = 100,
|
||||||
|
@ -88,12 +88,13 @@ add_client {
|
||||||
expected_y = wa.y
|
expected_y = wa.y
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- The second 100x100 window should be placed to the right of the first window.
|
-- The second 100x100 window should be placed to the right of the first
|
||||||
-- Note that this assumption fails if the screen is in the portrait orientation
|
-- window. Note that this assumption fails if the screen is in the portrait
|
||||||
-- (e.g., the test succeeds with a 600x703 screen and fails with 600x704).
|
-- orientation (e.g., the test succeeds with a 600x703 screen and fails with
|
||||||
add_client {
|
-- 600x704).
|
||||||
|
add_client {
|
||||||
geometry = function(wa)
|
geometry = function(wa)
|
||||||
return {
|
return {
|
||||||
width = 100,
|
width = 100,
|
||||||
|
@ -102,10 +103,10 @@ add_client {
|
||||||
expected_y = wa.y
|
expected_y = wa.y
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- The wide window should be placed below the two 100x100 windows.
|
-- The wide window should be placed below the two 100x100 windows.
|
||||||
add_client {
|
add_client {
|
||||||
geometry = function(wa)
|
geometry = function(wa)
|
||||||
return {
|
return {
|
||||||
width = wa.width - 50,
|
width = wa.width - 50,
|
||||||
|
@ -114,13 +115,13 @@ add_client {
|
||||||
expected_y = wa.y + tb_height + 2*border_width + 100
|
expected_y = wa.y + tb_height + 2*border_width + 100
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- The first large window which does not completely fit in any free area should
|
-- The first large window which does not completely fit in any free area
|
||||||
-- be placed at the bottom left corner (no_overlap should place it below the
|
-- should be placed at the bottom left corner (no_overlap should place it
|
||||||
-- wide window, and then no_offscreen should shift it up so that it would be
|
-- below the wide window, and then no_offscreen should shift it up so that
|
||||||
-- completely inside the workarea).
|
-- it would be completely inside the workarea).
|
||||||
add_client {
|
add_client {
|
||||||
geometry = function(wa)
|
geometry = function(wa)
|
||||||
return {
|
return {
|
||||||
width = wa.width - 10,
|
width = wa.width - 10,
|
||||||
|
@ -129,10 +130,10 @@ add_client {
|
||||||
expected_y = wa.y + 50 - 2*border_width - tb_height
|
expected_y = wa.y + 50 - 2*border_width - tb_height
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- The second large window should be placed at the top right corner.
|
-- The second large window should be placed at the top right corner.
|
||||||
add_client {
|
add_client {
|
||||||
geometry = function(wa)
|
geometry = function(wa)
|
||||||
return {
|
return {
|
||||||
width = wa.width - 10,
|
width = wa.width - 10,
|
||||||
|
@ -141,10 +142,10 @@ add_client {
|
||||||
expected_y = wa.y
|
expected_y = wa.y
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- The third large window should be placed at the bottom right corner.
|
-- The third large window should be placed at the bottom right corner.
|
||||||
add_client {
|
add_client {
|
||||||
geometry = function(wa)
|
geometry = function(wa)
|
||||||
return {
|
return {
|
||||||
width = wa.width - 10,
|
width = wa.width - 10,
|
||||||
|
@ -153,11 +154,11 @@ add_client {
|
||||||
expected_y = wa.y + 50 - 2*border_width - tb_height
|
expected_y = wa.y + 50 - 2*border_width - tb_height
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- The fourth large window should be placed at the top left corner (the whole
|
-- The fourth large window should be placed at the top left corner (the
|
||||||
-- workarea is occupied now).
|
-- whole workarea is occupied now).
|
||||||
add_client {
|
add_client {
|
||||||
geometry = function(wa)
|
geometry = function(wa)
|
||||||
return {
|
return {
|
||||||
width = wa.width - 50,
|
width = wa.width - 50,
|
||||||
|
@ -166,10 +167,10 @@ add_client {
|
||||||
expected_y = wa.y
|
expected_y = wa.y
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Kill test clients to prepare for the next iteration.
|
-- Kill test clients to prepare for the next iteration.
|
||||||
table.insert(tests, function(count)
|
table.insert(tests, function(count)
|
||||||
if count <= 1 then
|
if count <= 1 then
|
||||||
for _, data in ipairs(client_data) do
|
for _, data in ipairs(client_data) do
|
||||||
if data.c then
|
if data.c then
|
||||||
|
@ -181,7 +182,7 @@ table.insert(tests, function(count)
|
||||||
if #client.get() == 0 then
|
if #client.get() == 0 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue