summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run.lua b/tests/run.lua
index 11062ac..202eb4a 100644
--- a/tests/run.lua
+++ b/tests/run.lua
@@ -4164,6 +4164,23 @@ test("Missing explicit targets use character code zero", function()
same(domain.Descriptor.TILL_FORWARD, opposite_request.descriptor)
end)
+test("Encoded explicit targets return a neutral request", function()
+ local _, transitions = fresh_sequence_state()
+ local special_target = domain.TargetValue.special_key(
+ string.char(0x80, 0xfd, 0x01)
+ )
+ transitions:BeginAcquisition("n", "f")
+ transitions:CommitAcquiredTarget("n", special_target)
+ local resolver = repeat_resolver.new()
+
+ local same_request = resolver:same_direction_request("n")
+ local opposite_request = resolver:opposite_direction_request("n")
+ truthy(same_request.neutral)
+ truthy(opposite_request.neutral)
+ same(nil, same_request.target)
+ same(nil, opposite_request.descriptor)
+end)
+
for _, item in ipairs(tests) do
local ok, failure = xpcall(item.body, debug.traceback)
if not ok then