diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/run.lua | 26 |
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") |
