Add test for menubar.match_empty

This commit is contained in:
Ari Breitkreuz 2020-04-24 14:48:17 +02:00
parent 30911a3959
commit 2e6c911821
1 changed files with 24 additions and 13 deletions

View File

@ -37,22 +37,33 @@ do
end end
end end
local show_menubar_and_hide = function(count)
-- Just show the menubar and hide it.
-- TODO: Write a proper test. But for the mean time this is better than
-- nothing (and tells us when errors are thrown).
if count == 1 then
menubar.show()
end
-- Test that the async population of the menubar is done
if menubar_refreshed then
menubar.hide()
awesome.sync()
return true
end
end
runner.run_steps { runner.run_steps {
function(count) function(count)
-- Just show the menubar and hide it. -- Show and hide with defaults
-- TODO: Write a proper test. But for the mean time this is better than return show_menubar_and_hide(count)
-- nothing (and tells us when errors are thrown). end,
if count == 1 then function(count)
menubar.show() -- Show and hide with match_empty set to false
end menubar.match_empty = false
return show_menubar_and_hide(count)
-- Test that the async population of the menubar is done
if menubar_refreshed then
menubar.hide()
awesome.sync()
return true
end
end, end,
function() function()