Fixup typos in complemented test

This commit is contained in:
y5nw 2024-01-21 18:44:05 +01:00
parent c692b6ee79
commit 9c2be9d689

View file

@ -1,5 +1,4 @@
mtt.register("register non-player-recipients", function(callback) mail.register_recipient_handler(function(_, name)
mail.register_recipient_handler(function(sender, name)
if name:sub(1, 6) == "alias/" then if name:sub(1, 6) == "alias/" then
return true, name:sub(7) return true, name:sub(7)
elseif name == "list/test" then elseif name == "list/test" then
@ -7,11 +6,10 @@ mtt.register("register non-player-recipients", function(callback)
elseif name == "list/reject" then elseif name == "list/reject" then
return false, "It works (?)" return false, "It works (?)"
end end
end) end)
end
local function assert_inbox_count(player_name, count) local function assert_inbox_count(player_name, count)
local entry == mail.get_storage_entry(player_name) local entry = mail.get_storage_entry(player_name)
assert(entry, player_name .. " has no mail entry") assert(entry, player_name .. " has no mail entry")
local actual_count = #entry.inbox local actual_count = #entry.inbox
assert(actual_count == count, ("incorrect mail count: %d expected, got %d"):format(count, actual_count)) assert(actual_count == count, ("incorrect mail count: %d expected, got %d"):format(count, actual_count))