tests: Test the error notifications when no screens are present.
This happens in early initialization when AwesomeWM is started with `--screen manual`.
This commit is contained in:
parent
51e3d66110
commit
553cafccde
|
@ -64,6 +64,23 @@ local steps = {
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
end,
|
||||||
|
-- Make sure the error code still works when all screens are gone.
|
||||||
|
function()
|
||||||
|
while screen.count() > 0 do
|
||||||
|
screen[1]:fake_remove()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Don't make the test fail.
|
||||||
|
local called = false
|
||||||
|
require("gears.debug").print_warning = function() called = true end
|
||||||
|
|
||||||
|
-- Cause an error in a protected call!
|
||||||
|
awesome.emit_signal("debug::error", "err")
|
||||||
|
|
||||||
|
assert(called)
|
||||||
|
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue