From fb1385f32ef45a99b8860b2100568d95f565be5a Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:14:00 +0200 Subject: Default missing explicit targets --- tests/run.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/run.lua') diff --git a/tests/run.lua b/tests/run.lua index d360332..11062ac 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -4147,6 +4147,23 @@ test("Missing explicit descriptors return a neutral request", function() truthy(resolver:opposite_direction_request("n").neutral) end) +test("Missing explicit targets use character code zero", function() + local _, transitions = fresh_sequence_state() + transitions:BeginAcquisition("n", "T") + local resolver = repeat_resolver.new() + + local same_request = resolver:same_direction_request("n") + local opposite_request = resolver:opposite_direction_request("n") + for _, request in ipairs({ same_request, opposite_request }) do + falsy(request.neutral) + same(domain.TargetKind.CODE_FALLBACK, request.target.kind) + same(0, request.target.first_code) + same("", request.target.value) + end + same(domain.Descriptor.TILL_BACKWARD, same_request.descriptor) + same(domain.Descriptor.TILL_FORWARD, opposite_request.descriptor) +end) + for _, item in ipairs(tests) do local ok, failure = xpcall(item.body, debug.traceback) if not ok then -- cgit v1.2.3