test: fix tests

This commit is contained in:
Folke Lemaitre 2025-02-15 23:09:58 +01:00
parent f81a3fb7fe
commit e5e9bf4821
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 2 additions and 1 deletions

View file

@ -306,7 +306,7 @@ function M:fix_disabled()
local changes = 0
local function check(top)
for _, plugin in pairs(self.plugins) do
if plugin._.top == top then
if (plugin._.top or false) == top then
if plugin.enabled == false or (type(plugin.enabled) == "function" and not plugin.enabled()) then
changes = changes + 1
if plugin.optional then

View file

@ -25,6 +25,7 @@ local function clean(plugins)
if plugin._.dep == false then
plugin._.dep = nil
end
plugin._.top = nil
return plugin
end, plugins)
end