summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua23
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