summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index db19ffa..1afe2c8 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -7730,6 +7730,27 @@ test("Same-direction explicit coordination reads current-context state", functio
same(visual_target, resolution.request.target)
end)
+test("Opposite explicit coordination swaps current-context descriptor", function()
+ for _, stored in ipairs({ "f", "F", "t", "T" }) do
+ local _, transitions = fresh_sequence_state()
+ local stored_target = target("x")
+ transitions:BeginAcquisition("n", stored)
+ transitions:CommitAcquiredTarget("n", stored_target)
+ local host = MemoryHost.new({
+ configuration = { fix_key_direction = true },
+ count = 3,
+ })
+
+ local resolution = sequence_coordinator.new({ host = host })
+ :repeat_opposite_direction()
+
+ same("explicit_opposite", resolution.kind)
+ same(domain.Descriptor.swap(stored), resolution.request.descriptor)
+ same(stored_target, resolution.request.target)
+ same(3, resolution.invocation.count.value)
+ end
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then