From b19a8857d7ff9849ee2c1c1e2a436e6c23fd08db Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:34:50 +0200 Subject: Allow eligible feedback contexts --- tests/run.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index 7cb848c..b337b10 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -5983,6 +5983,32 @@ test("Persistent matches share one high-priority character overlay", function() same(1, map_size(host:highlights())) end) +test("Persistent feedback accepts every eligible mode context", function() + local eligible = { + "n", + "v", + "V", + string.char(0x16), + "s", + "S", + string.char(0x13), + "cv", + "cvr", + } + for _, context in ipairs(eligible) do + truthy( + feedback_service.persistent_context_eligible(context), + "expected eligible context " .. string.format("%q", context) + ) + end + for _, context in ipairs({ "no", "nov", "c", "niI" }) do + falsy( + feedback_service.persistent_context_eligible(context), + "expected ineligible context " .. context + ) + end +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3