From 5913866a0e2918a1cab8700d79f2f0dbf5832cd1 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:46:19 +0200 Subject: Sample primary restoration policy --- tests/run.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') 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 -- cgit v1.2.3