From 08bdcf5239e4d69cb08933a0b079ca18e151c3ae Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 11:54:05 +0200 Subject: Fix special key packet bytes --- tests/run.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index 31c223e..61ab1ab 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -253,11 +253,20 @@ test("InputPacket carries every input capability variant", function() local text = domain.InputPacket.text("a") local bytes = domain.InputPacket.raw_bytes({ 0x80, 0xfd, 0x60 }) local special = domain.InputPacket.special_key("Left", string.char(0x80, 1)) + local special_from_table = domain.InputPacket.from_table({ + kind = "special_key", + name = "Escape", + bytes = { 27 }, + }) local failure = domain.InputPacket.error("input failed") same(domain.InputPacketKind.TEXT, text.kind) list_same({ 0x80, 0xfd, 0x60 }, bytes:bytes()) same("Left", special.name) + list_same({ 0x80, 1 }, special:bytes()) + same(string.char(27), special_from_table.encoded) + list_same({ 27 }, special_from_table:bytes()) + list_same({ 27 }, special_from_table:to_table().bytes) same("input failed", failure.message) end) -- cgit v1.2.3