summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index b577512..3c45045 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -7539,6 +7539,30 @@ test("Primary repetition restores stored-descriptor feedback before movement", f
)
end)
+test("Primary resolutions carry current first-move state", function()
+ local _, transitions = fresh_sequence_state()
+ local fresh_host = MemoryHost.new({
+ buffer_lines = { "aba" },
+ input_packets = { { kind = "text", text = "a" } },
+ configuration = {
+ mark_cursor = false,
+ mark_char = false,
+ },
+ })
+ local fresh = sequence_coordinator.new({ host = fresh_host }):primary("t")
+ truthy(fresh.first_move)
+
+ local landing = domain.Position.new(1, 3)
+ transitions:CommitCommandSuccess("n", landing, true)
+ local repeated_host = MemoryHost.new({
+ buffer_lines = { "ababa" },
+ cursor = landing,
+ configuration = { mark_char = false },
+ })
+ local repeated = sequence_coordinator.new({ host = repeated_host }):primary("t")
+ falsy(repeated.first_move)
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then