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:
Emmanuel Lepage Vallee 2019-06-15 02:17:34 -04:00
parent 51e3d66110
commit 553cafccde
1 changed files with 17 additions and 0 deletions

View File

@ -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
} }