diff --git a/tests/test-awful-screen.lua b/tests/test-awful-screen.lua index 1db5dc2c0..692c5f97e 100644 --- a/tests/test-awful-screen.lua +++ b/tests/test-awful-screen.lua @@ -64,6 +64,23 @@ local steps = { return true 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 }