Bug 1965: verify that buildings cannot be built on packice.

This commit is contained in:
Enno Rehling 2015-07-08 16:11:25 +02:00
parent 247aecd92c
commit f1217ed7a9
1 changed files with 25 additions and 0 deletions

View File

@ -25,3 +25,28 @@ function test_small_castles()
assert_equal("site", b:get_typename(9)) assert_equal("site", b:get_typename(9))
assert_equal("fortification", b:get_typename(10)) assert_equal("fortification", b:get_typename(10))
end end
function test_build_normal()
local r = region.create(0, 0, "plain")
local f = faction.create("noreply@eressea.de", "human", "de")
local u = unit.create(f, r, 1)
u:clear_orders()
u:add_item("stone", 10)
u:set_skill("building", 10)
u:add_order("MACHE BURG")
process_orders()
assert_not_nil(u.building)
assert_equal(10, u.building.size)
end
function test_build_packice()
local r = region.create(0, 0, "packice")
local f = faction.create("noreply@eressea.de", "human", "de")
local u = unit.create(f, r, 1)
u:clear_orders()
u:add_item("stone", 10)
u:set_skill("building", 10)
u:add_order("MACHE BURG")
process_orders()
assert_equal(nil, u.building)
end