tests: fix indenting/style (#1303)
Basically: > for f in **/*.lua; do vim '+set sw=4' '+norm gg=G' '+wq' "$f"; done
This commit is contained in:
parent
bdb7e90b74
commit
68de588f21
|
@ -4,34 +4,27 @@ awful.util.deprecate = function() end
|
|||
|
||||
local has_spawned = false
|
||||
local steps = {
|
||||
|
||||
function(count)
|
||||
|
||||
if count <= 1 and not has_spawned and #client.get() < 2 then
|
||||
awful.spawn("xterm")
|
||||
awful.spawn("xterm")
|
||||
has_spawned = true
|
||||
elseif #client.get() >= 2 then
|
||||
|
||||
elseif #client.get() >= 2 then
|
||||
-- Test properties
|
||||
client.focus = client.get()[1]
|
||||
|
||||
local s = mouse.screen
|
||||
|
||||
assert(s)
|
||||
|
||||
assert(s == screen[s])
|
||||
|
||||
-- Test padding
|
||||
|
||||
s.padding = 42
|
||||
|
||||
local counter = 0
|
||||
for _, v in pairs(s.padding) do
|
||||
assert(v == 42)
|
||||
counter = counter + 1
|
||||
end
|
||||
|
||||
assert(counter == 4)
|
||||
|
||||
awful.screen.padding(s, {
|
||||
|
@ -40,13 +33,11 @@ awful.screen.padding(s, {
|
|||
top = 1337,
|
||||
bottom = 1337,
|
||||
})
|
||||
|
||||
counter = 0
|
||||
for _, v in pairs(s.padding) do
|
||||
assert(v == 1337)
|
||||
counter = counter + 1
|
||||
end
|
||||
|
||||
assert(counter == 4)
|
||||
|
||||
counter = 0
|
||||
|
@ -54,20 +45,15 @@ for _, v in pairs(awful.screen.padding(s)) do
|
|||
assert(v == 1337)
|
||||
counter = counter + 1
|
||||
end
|
||||
|
||||
assert(counter == 4)
|
||||
|
||||
-- Test square distance
|
||||
|
||||
assert(s:get_square_distance(9999, 9999))
|
||||
|
||||
assert(s:get_square_distance(9999, 9999)
|
||||
== awful.screen.getdistance_sq(s, 9999, 9999))
|
||||
|
||||
-- Test count
|
||||
|
||||
counter = 0
|
||||
|
||||
for _ in screen do
|
||||
counter = counter + 1
|
||||
end
|
||||
|
@ -78,7 +64,6 @@ counter = 0
|
|||
awful.screen.connect_for_each_screen(function()
|
||||
counter = counter + 1
|
||||
end)
|
||||
|
||||
assert(screen.count() == counter)
|
||||
|
||||
return true
|
||||
|
@ -87,3 +72,5 @@ end
|
|||
}
|
||||
|
||||
require("_runner").run_steps(steps)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue