diff options
Diffstat (limited to 'tests/run.lua')
| -rw-r--r-- | tests/run.lua | 26 |
1 files changed, 26 insertions, 0 deletions
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 |
