diff options
Diffstat (limited to 'tests/run.lua')
| -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 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 |
