diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 696026e..de48f0b 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -4257,6 +4257,30 @@ test("Default label evaluation preserves a colorscheme definition", function() same("read_highlight_group", operations[1].operation) end) +test("Default label evaluation defines the fallback when absent", function() + local host = MemoryHost.new() + local feedback = feedback_service.new(host) + + local result = feedback:ensure_default_label() + same("fallback", result.source) + truthy(result.applied) + local definition = host:highlight_groups().CleverFDefaultLabel + same("red", definition.guifg) + same("NONE", definition.guibg) + truthy(definition.gui.bold) + truthy(definition.gui.underline) + same("red", definition.ctermfg) + same("NONE", definition.ctermbg) + truthy(definition.cterm.bold) + truthy(definition.cterm.underline) + + local operations = host:operations() + same(2, #operations) + same("read_highlight_group", operations[1].operation) + same("define_highlight_group", operations[2].operation) + truthy(operations[2].options.default) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
