diff --git a/scripts/tests/e3/stealth.lua b/scripts/tests/e3/stealth.lua index bc78db006..38ca7d8ea 100644 --- a/scripts/tests/e3/stealth.lua +++ b/scripts/tests/e3/stealth.lua @@ -6,31 +6,29 @@ local f local u function setup() - eressea.game.reset() - eressea.settings.set("rules.food.flags", "4") + eressea.game.reset() + eressea.settings.set("rules.food.flags", "4") - local r = region.create(0,0, "plain") - f = faction.create("stealth1@eressea.de", "human", "de") - u = unit.create(f, r, 1) - f = faction.create("stealth2@eressea.de", "human", "de") + local r = region.create(0,0, "plain") + f = faction.create("stealth1@eressea.de", "human", "de") + u = unit.create(f, r, 1) + f = faction.create("stealth2@eressea.de", "human", "de") end function test_stealth_faction_on() - u:clear_orders() - u:add_order("TARNE PARTEI") + u:clear_orders() + u:add_order("TARNE PARTEI") - eressea.settings.set("rules.stealth.faction", 1) - process_orders() - assert_not_match("Partei", report.report_unit(u, f)) - assert_match("anonym", report.report_unit(u, f)) + process_orders() + assert_not_match("Partei", report.report_unit(u, f)) + assert_match("anonym", report.report_unit(u, f)) end -function test_stealth_faction_off() - u:clear_orders() - u:add_order("TARNE PARTEI") +function test_stealth_faction_other() + u:clear_orders() + u:add_order("TARNE PARTEI " .. itoa36(f.id)) - eressea.settings.set("rules.stealth.faction", 0) - process_orders() - assert_match("Partei", report.report_unit(u, f)) - assert_not_match("anonym", report.report_unit(u, f)) + process_orders() + assert_not_match("anonym", report.report_unit(u, f)) + assert_not_match(itoa36(f.id), report.report_unit(u, f)) end