diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:34:50 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:34:50 +0200 |
| commit | b19a8857d7ff9849ee2c1c1e2a436e6c23fd08db (patch) | |
| tree | 3b90a26a4b605b00e747815029ff356c6f1bcb19 /tests/run.lua | |
| parent | 97dd567a7847e6efb7974a000353ecf4c44e1519 (diff) | |
Allow eligible feedback contexts
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 |
