From 753f248eb30350eb9ba6ca108e466be8e54a51c8 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:35:32 +0200 Subject: Apply missing default label fallback --- tests/run.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/run.lua') 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 -- cgit v1.2.3