fix potion test, use only one

This commit is contained in:
Enno Rehling 2017-12-27 07:11:21 +01:00
parent 28252fda7b
commit 250faefff4
2 changed files with 9 additions and 5 deletions

View file

@ -23,7 +23,6 @@ function test_water_of_life()
process_orders()
assert_equal(0, u:get_item('p2'))
assert_equal(0, u:get_item('log'))
process_orders()
assert_equal(trees+10, r:get_resource('sapling'))
end

View file

@ -14,15 +14,20 @@ function test_water_of_life()
local f = faction.create("human")
local u = unit.create(f, r, 1)
local trees = r:get_resource('tree')
u:add_item('p2', 2)
u:add_item('p2', 1)
u:add_item('log', 10)
u:add_order("BENUTZE 1 'Wasser des Lebens'")
u:add_order("ZEIGE 'Wasser des Lebens'")
process_orders()
assert_equal(1, u:get_item('p2'))
assert_equal(0, u:get_item('p2'))
assert_equal(5, u:get_item('log'))
process_orders()
assert_equal(trees+5, r:get_resource('tree'))
trees = r:get_resource('tree')-trees
if trees~=5 then
init_reports()
write_report(f)
print(f, get_turn())
end
assert_equal(5, trees)
end
function test_give_horses()