summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 14:32:23 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 14:32:23 +0200
commit7566197269a4a1767df1ce4d39f8fad6844ec587 (patch)
tree8048d49141e25f4fd9d2bc7357601d4af476d3a6 /tests
parent6912c7a6adad1cb5503327896a25a4521a156485 (diff)
Expose diagnostic full reset
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index e00f694..d4535ef 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -8415,6 +8415,32 @@ test("ActionFacade Reset applies public cleanup and returns neutral", function()
falsy(host:timers()[timer].active)
end)
+test("Diagnostic full reset is available only through diagnostic API", function()
+ local state, transitions = fresh_sequence_state()
+ transitions:BeginAcquisition("n", "f")
+ transitions:CommitAcquiredTarget("n", target("a"), 10)
+ transitions:CommitCommandSuccess(
+ "n",
+ domain.Position.new(1, 2),
+ domain.Direction.FORWARD
+ )
+ local host = MemoryHost.new({ cursor = { line = 1, byte_column = 2 } })
+ local root = composition_root.new({ host = host })
+ local activation = root:activate()
+
+ same(nil, activation.actions.DiagnosticFullReset)
+ local outcome = root:diagnostic_full_reset()
+ same(domain.ActionKind.NEUTRAL, outcome.kind)
+ same(nil, state:get_previous_descriptor("n"))
+ same(nil, state:get_previous_target("n"))
+ same(nil, state.last_input_context)
+ falsy(state.moved_forward)
+ falsy(state.moved_forward_initialized)
+ fails(function()
+ host:invoke_action("DiagnosticFullReset")
+ end, "not registered")
+end)
+
test("Same-direction explicit coordination reads current-context state", function()
local _, transitions = fresh_sequence_state()
local normal_target = target("a")