diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:35:32 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:35:32 +0200 |
| commit | 753f248eb30350eb9ba6ca108e466be8e54a51c8 (patch) | |
| tree | 373abf23474eb6276432686a76d5154639363948 /tests | |
| parent | 0809f1eb0c73648cae15806cf8a43ad35f445f7c (diff) | |
Apply missing default label fallback
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 |
