forked from github/server
fix tests that try to disable mallorn.
This commit is contained in:
parent
b1098f7838
commit
950a7b7f9c
|
@ -12,6 +12,26 @@ function setup()
|
|||
eressea.settings.set("rules.peasants.growth.factor", "0")
|
||||
end
|
||||
|
||||
function disabled_double_default()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f = faction.create("human")
|
||||
local u = unit.create(f, r, 1)
|
||||
region.create(1, 0, "plain")
|
||||
region.create(2, 0, "plain")
|
||||
region.create(3, 0, "plain")
|
||||
|
||||
u:add_order('NACH O')
|
||||
u:add_order('DEFAULT "NACH O"')
|
||||
u:add_order('DEFAULT "DEFAULT ARBEITE"')
|
||||
process_orders()
|
||||
assert_equal(1, u.region.x)
|
||||
process_orders()
|
||||
assert_equal(2, u.region.x)
|
||||
process_orders()
|
||||
assert_equal(2, u.region.x)
|
||||
assert_equal("ARBEITE", u:get_order())
|
||||
end
|
||||
|
||||
function test_give_unit()
|
||||
local r = region.create(0, 0, "plain")
|
||||
local f1 = faction.create('elf')
|
||||
|
|
|
@ -3,7 +3,7 @@ require "lunit"
|
|||
module("tests.e2.spells", package.seeall, lunit.testcase)
|
||||
|
||||
function setup()
|
||||
eressea.free_game()
|
||||
eressea.game.reset()
|
||||
eressea.settings.set("nmr.removenewbie", "0")
|
||||
eressea.settings.set("nmr.timeout", "0")
|
||||
eressea.settings.set("NewbieImmunity", "0")
|
||||
|
|
|
@ -15,7 +15,7 @@ function test_no_growth()
|
|||
set_turn(204)
|
||||
assert_equal('spring', get_season())
|
||||
local r = region.create(0, 0, 'plain')
|
||||
r:set_flag(2, 0) -- no mallorn
|
||||
r:set_flag(1, false) -- no mallorn
|
||||
r:set_resource('seed', 0)
|
||||
r:set_resource('sapling', 0)
|
||||
r:set_resource('tree', 0)
|
||||
|
@ -30,7 +30,7 @@ function test_spring_growth()
|
|||
set_turn(204)
|
||||
assert_equal('spring', get_season())
|
||||
local r = region.create(0, 0, 'plain')
|
||||
r:set_flag(2, 0) -- no mallorn
|
||||
r:set_flag(1, false) -- no mallorn
|
||||
r:set_resource('seed', 6)
|
||||
r:set_resource('sapling', 17)
|
||||
r:set_resource('tree', 0)
|
||||
|
@ -46,7 +46,7 @@ function test_plant_fail()
|
|||
assert_equal('summer', get_season())
|
||||
local f = faction.create('goblin')
|
||||
local r = region.create(0, 0, 'plain')
|
||||
r:set_flag(2, 0) -- no mallorn
|
||||
r:set_flag(1, false) -- no mallorn
|
||||
r:set_resource('seed', 0)
|
||||
r:set_resource('sapling', 0)
|
||||
r:set_resource('tree', 0)
|
||||
|
@ -67,7 +67,7 @@ function test_plant_summer()
|
|||
assert_equal('summer', get_season())
|
||||
local f = faction.create('goblin')
|
||||
local r = region.create(0, 0, 'plain')
|
||||
r:set_flag(2, 0) -- no mallorn
|
||||
r:set_flag(1, false) -- no mallorn
|
||||
r:set_resource('seed', 0)
|
||||
r:set_resource('sapling', 0)
|
||||
r:set_resource('tree', 0)
|
||||
|
@ -89,7 +89,7 @@ function test_plant_spring_saplings()
|
|||
local f = faction.create('goblin')
|
||||
local r = region.create(0, 0, 'plain')
|
||||
local u = unit.create(f, r)
|
||||
r:set_flag(2, 0) -- no mallorn
|
||||
r:set_flag(1, false) -- no mallorn
|
||||
r:set_resource('seed', 0)
|
||||
r:set_resource('sapling', 0)
|
||||
r:set_resource('tree', 0)
|
||||
|
@ -117,7 +117,7 @@ function test_plant_spring_seeds()
|
|||
local f = faction.create('goblin')
|
||||
local r = region.create(0, 0, 'plain')
|
||||
local u = unit.create(f, r)
|
||||
r:set_flag(2, 0) -- no mallorn
|
||||
r:set_flag(1, false) -- no mallorn
|
||||
r:set_resource('seed', 0)
|
||||
r:set_resource('sapling', 0)
|
||||
r:set_resource('tree', 0)
|
||||
|
|
Loading…
Reference in New Issue