From 0809f1eb0c73648cae15806cf8a43ad35f445f7c Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:34:56 +0200 Subject: Preserve colorscheme default labels --- tests/run.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index 082b952..696026e 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -4233,6 +4233,30 @@ test("Default label fallback covers GUI and terminal rendering", function() truthy(fresh.cterm.bold) end) +test("Default label evaluation preserves a colorscheme definition", function() + local supplied = { + guifg = "blue", + gui = { italic = true }, + } + local host = MemoryHost.new({ + highlight_groups = { + CleverFDefaultLabel = supplied, + }, + }) + local feedback = feedback_service.new(host) + + local result = feedback:ensure_default_label() + same("colorscheme", result.source) + falsy(result.applied) + same("blue", result.definition.guifg) + truthy(result.definition.gui.italic) + same("blue", host:highlight_groups().CleverFDefaultLabel.guifg) + + local operations = host:operations() + same(1, #operations) + same("read_highlight_group", operations[1].operation) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3