diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:36:48 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 11:36:48 +0200 |
| commit | fb7578788d9192387228c60c76590d2328e64119 (patch) | |
| tree | bc6c57f9af12d62e21a24c6c8255440cf1c433f3 /tests/run.lua | |
| parent | 9ff556e67af425c9bdf187f214bd9323b22f2413 (diff) | |
Create feature fallback links
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index e1c7e78..b3ba0dd 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -4335,6 +4335,29 @@ test("Feature link evaluation preserves colorscheme CleverF groups", function() end end) +test("Missing feature groups receive fallback links", function() + local host = MemoryHost.new() + local feedback = feedback_service.new(host) + + local results = feedback:evaluate_feature_links() + same("fallback", results.CleverFCursor.source) + truthy(results.CleverFCursor.applied) + local groups = host:highlight_groups() + same(results.CleverFCursor.target, groups.CleverFCursor.link) + + local fallback_definition + for _, operation in ipairs(host:operations()) do + if operation.operation == "define_highlight_group" + and operation.name == "CleverFCursor" + then + fallback_definition = operation + end + end + truthy(fallback_definition ~= nil) + truthy(fallback_definition.options.default) + same(nil, fallback_definition.options.force) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
