diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:46:19 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:46:19 +0200 |
| commit | 5913866a0e2918a1cab8700d79f2f0dbf5832cd1 (patch) | |
| tree | 26a191b80efa22b03ce6559376ae18301fd55f44 /tests | |
| parent | 1c2e6fc2638a57336ca0a2e5ae1fbe8015fc3dc3 (diff) | |
Sample primary restoration policy
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua index 0e33c03..9793411 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -6738,6 +6738,24 @@ test("Timer cleanup preserves primary movement history", function() same(domain.ModeContext.from_full_mode("n"), state.last_input_context) end) +test("Primary restoration samples marker and context eligibility", function() + local _, transitions = fresh_sequence_state() + local host = MemoryHost.new({ + configuration = { mark_char = false }, + }) + local feedback = feedback_service.new({ + host = host, + transitions = transitions, + }) + + falsy(feedback:primary_restoration_active("n", "window-1")) + host:set_configuration("mark_char", true) + falsy(feedback:primary_restoration_active("no", "window-1")) + truthy(feedback:primary_restoration_active("n", "window-1")) + truthy(feedback:primary_restoration_active("v", "window-1")) + truthy(feedback:primary_restoration_active("s", "window-1")) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then |
