forked from github/server
Functional test for bug 1882: Verify that COMBAT/FIGHT/KÄMPFE have the desired effect.
This commit is contained in:
parent
14b1a164ed
commit
0aa002a6d2
|
@ -2,3 +2,4 @@ require 'tests.e3.castles'
|
|||
require 'tests.e3.stealth'
|
||||
require 'tests.e3.spells'
|
||||
require 'tests.e3.rules'
|
||||
require 'tests.e3.parser'
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
require 'lunit'
|
||||
|
||||
module('tests.e3.parser', package.seeall, lunit.testcase)
|
||||
|
||||
function setup()
|
||||
eressea.game.reset()
|
||||
end
|
||||
|
||||
function test_set_status_en()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("bug_1882@eressea.de", "human", "en")
|
||||
local u = unit.create(f, r, 1)
|
||||
u.status = 1
|
||||
u:clear_orders()
|
||||
u:add_order("COMBAT AGGRESSIVE")
|
||||
process_orders()
|
||||
assert_equal(u.status, 0)
|
||||
u.status = 1
|
||||
u:add_order("FIGHT AGGRESSIVE")
|
||||
process_orders()
|
||||
assert_equal(u.status, 0)
|
||||
end
|
||||
|
||||
function test_set_status_de()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("bug_1882@eressea.de", "human", "de")
|
||||
local u = unit.create(f, r, 1)
|
||||
u.status = 1
|
||||
u:clear_orders()
|
||||
u:add_order("KAEMPFE AGGRESSIV")
|
||||
process_orders()
|
||||
assert_equal(u.status, 0)
|
||||
end
|
||||
|
Loading…
Reference in New Issue