From b89e76780e6f548df521ff69cf2b071ca91993ab Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:04:10 +0200 Subject: Read contextual landing --- tests/run.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index 48928e7..3095e6d 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -11,6 +11,7 @@ local capabilities = require("clever_f.capabilities") local destination_engine = require("clever_f.destination_engine") local case_policy = require("clever_f.case_policy") local policy = require("clever_f.policy") +local repeat_resolver = require("clever_f.repeat_resolver") local migemo_catalog = require("clever_f.migemo_catalog") local motion_plan = require("clever_f.motion_plan") local motion_executor = require("clever_f.motion_executor") @@ -3786,6 +3787,22 @@ test("Select contexts execute through the command path", function() same(0, applied_selection) end) +test("RepeatResolver reads the normalized contextual landing", function() + local _, transitions = fresh_sequence_state() + local landing = domain.Position.new(3, 7) + transitions:BeginAcquisition("nov", "f") + transitions:CommitCommandSuccess("noV", landing, true) + + local resolver = repeat_resolver.new() + same(landing, resolver:previous_landing("no" .. string.char(0x16))) + same(nil, resolver:previous_landing("n")) + truthy(repeat_resolver.RepeatResolver.is(resolver)) + same(resolver, repeat_resolver.new(resolver)) + fails(function() + resolver.extra = true + end, "immutable") +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3