From fb7578788d9192387228c60c76590d2328e64119 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:36:48 +0200 Subject: Create feature fallback links --- tests/run.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests/run.lua') 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 -- cgit v1.2.3