summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index eb82d0b..b577512 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -7508,6 +7508,37 @@ test("Primary repetition builds its effective contextual motion plan", function(
)
end)
+test("Primary repetition restores stored-descriptor feedback before movement", function()
+ local state, transitions = fresh_sequence_state()
+ local landing = domain.Position.new(1, 3)
+ transitions:BeginAcquisition("n", "t")
+ transitions:CommitAcquiredTarget("n", target("b"))
+ transitions:CommitCommandSuccess("n", landing, true)
+ local host = MemoryHost.new({
+ buffer_lines = { "ababa" },
+ cursor = landing,
+ configuration = { mark_char = true },
+ emit_movement_events = false,
+ })
+
+ local resolution = sequence_coordinator.new({ host = host }):primary("T")
+
+ truthy(resolution.restored_feedback ~= nil)
+ same(
+ domain.Descriptor.TILL_FORWARD,
+ resolution.restored_feedback.descriptor
+ )
+ same(resolution.target_plan, resolution.restored_feedback.target_plan)
+ same(
+ domain.Descriptor.TILL_BACKWARD,
+ resolution.motion_plan.descriptor
+ )
+ same(
+ resolution.restored_feedback.identity,
+ state.target_overlays[1].identity
+ )
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then