Fix indentation in test-struts.lua

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-12-31 14:51:29 +01:00
parent b4387d387d
commit 9089874193
1 changed files with 71 additions and 71 deletions

View File

@ -78,40 +78,40 @@ table.insert(steps, function()
end) end)
table.insert(steps, function() table.insert(steps, function()
assert(parent:geometry().width == 500) assert(parent:geometry().width == 500)
assert(parent:geometry().height == 500) assert(parent:geometry().height == 500)
assert(parent:geometry().y == small:geometry().y) assert(parent:geometry().y == small:geometry().y)
assert(parent:geometry().x == small:geometry().x) assert(parent:geometry().x == small:geometry().x)
assert(parent:geometry().width == small:geometry().width ) assert(parent:geometry().width == small:geometry().width )
assert(small:geometry().height == 24) assert(small:geometry().height == 24)
-- Now, move the parent and see of the attached one is correctly updated -- Now, move the parent and see of the attached one is correctly updated
placement.stretch_left(parent) placement.stretch_left(parent)
return true return true
end) end)
table.insert(steps, function() table.insert(steps, function()
assert(parent:geometry().y == small:geometry().y) assert(parent:geometry().y == small:geometry().y)
assert(parent:geometry().x == small:geometry().x) assert(parent:geometry().x == small:geometry().x)
assert(parent:geometry().width == small:geometry().width ) assert(parent:geometry().width == small:geometry().width )
assert(small:geometry().height == 24) assert(small:geometry().height == 24)
-- Do the same, but with placement compositing -- Do the same, but with placement compositing
small = wibox { small = wibox {
bg = "#ff0000", bg = "#ff0000",
height = 50, height = 50,
width = 50, width = 50,
ontop = true, ontop = true,
visible = true, visible = true,
} }
local p = placement.bottom_right + placement.scale local p = placement.bottom_right + placement.scale
p(small, {parent=parent, attach=true, direction="left", to_percent=0.5}) p(small, {parent=parent, attach=true, direction="left", to_percent=0.5})
return true return true
end) end)
local function check_ratio() local function check_ratio()
@ -153,27 +153,27 @@ table.insert(steps, function()
end) end)
table.insert(steps, function() table.insert(steps, function()
local wa = screen.primary.workarea local wa = screen.primary.workarea
local sgeo = screen.primary.geometry local sgeo = screen.primary.geometry
local wgeo = twibar:geometry() local wgeo = twibar:geometry()
assert(wa.width == sgeo.width ) assert(wa.width == sgeo.width )
assert(wa.x == sgeo.x ) assert(wa.x == sgeo.x )
assert(wa.y == sgeo.y + wgeo.height ) assert(wa.y == sgeo.y + wgeo.height )
-- assert(wa.height == sgeo.height - wgeo.height) -- assert(wa.height == sgeo.height - wgeo.height)
-- assert(wgeo.height == sgeo.height - wa.height ) -- assert(wgeo.height == sgeo.height - wa.height )
assert(parent.y == wa.y ) assert(parent.y == wa.y )
assert(parent.x == wa.x ) assert(parent.x == wa.x )
assert(parent.width == wa.width ) assert(parent.width == wa.width )
assert(parent.height == wa.height ) assert(parent.height == wa.height )
-- Add more wibars -- Add more wibars
bwibar = wibar {position = "bottom", bg = "#00ff00"} bwibar = wibar {position = "bottom", bg = "#00ff00"}
lwibar = wibar {position = "left" , bg = "#0000ff"} lwibar = wibar {position = "left" , bg = "#0000ff"}
rwibar = wibar {position = "right" , bg = "#ff00ff"} rwibar = wibar {position = "right" , bg = "#ff00ff"}
return true return true
end) end)
-- Make sure the maximized client has the right size and position -- Make sure the maximized client has the right size and position
@ -243,54 +243,54 @@ table.insert(steps, function()
end) end)
table.insert(steps, function() table.insert(steps, function()
check_maximize() check_maximize()
-- There should be a detach callback -- There should be a detach callback
assert(lwibar.detach_callback) assert(lwibar.detach_callback)
-- Begin to move wibars around -- Begin to move wibars around
lwibar.position = "top" lwibar.position = "top"
assert(lwibar.position == "top") assert(lwibar.position == "top")
assert(lwibar.y == twibar.height) assert(lwibar.y == twibar.height)
return true return true
end) end)
table.insert(steps, function() table.insert(steps, function()
check_maximize() check_maximize()
bwibar.position = "right" bwibar.position = "right"
bwibar.ontop = true bwibar.ontop = true
rwibar.ontop = true rwibar.ontop = true
assert(bwibar.position == "right") assert(bwibar.position == "right")
return true return true
end) end)
table.insert(steps, function() table.insert(steps, function()
check_maximize() check_maximize()
rwibar.position = "top" rwibar.position = "top"
return true return true
end) end)
table.insert(steps, function() table.insert(steps, function()
check_maximize() check_maximize()
bwibar.position = "top" bwibar.position = "top"
return true return true
end) end)
table.insert(steps, function() table.insert(steps, function()
check_maximize() check_maximize()
for _, w in ipairs {twibar, lwibar, rwibar, bwibar} do for _, w in ipairs {twibar, lwibar, rwibar, bwibar} do
w.position = "right" w.position = "right"
end end
return true return true
end) end)
-- Test visibility -- Test visibility
@ -304,17 +304,17 @@ table.insert(steps, function()
end) end)
table.insert(steps, function() table.insert(steps, function()
check_maximize() check_maximize()
twibar.visible = true twibar.visible = true
return true return true
end) end)
table.insert(steps, function() table.insert(steps, function()
check_maximize() check_maximize()
return true return true
end) end)