summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 22a9003..7caeb6c 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -7284,6 +7284,33 @@ test("Fresh primary resolution uses its initiating descriptor", function()
end
end)
+test("Fresh primary resolution reuses acquired plans and marks empty motion", function()
+ fresh_sequence_state()
+ local host = MemoryHost.new({
+ buffer_lines = { "aba" },
+ input_packets = {
+ { kind = "special_key", name = "Left", bytes = { 0x80, 0x01 } },
+ },
+ configuration = {
+ mark_cursor = false,
+ mark_char = false,
+ },
+ })
+ local coordinator = sequence_coordinator.new({ host = host })
+ local invocation = coordinator:read_primary_invocation()
+ local acquired = coordinator:acquire_primary("f", invocation)
+ local resolution = coordinator:fresh_primary_resolution(
+ "f",
+ acquired,
+ invocation
+ )
+
+ same(acquired.target_plan, resolution.target_plan)
+ same(acquired.motion_plan, resolution.motion_plan)
+ same(domain.TargetPlanKind.EMPTY, resolution.target_plan.kind)
+ truthy(resolution.skip_destination)
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then