From e5947f432e8d98ca4e36e31f954ecd309295afbd Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 19 Jan 2020 18:20:12 +0100 Subject: [PATCH] fix intermittent test because sometimes regions contained mallorn. --- scripts/tests/e2/trees.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/tests/e2/trees.lua b/scripts/tests/e2/trees.lua index d2a1ec277..933ae78e0 100644 --- a/scripts/tests/e2/trees.lua +++ b/scripts/tests/e2/trees.lua @@ -15,6 +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_resource('seed', 0) r:set_resource('sapling', 0) r:set_resource('tree', 0) @@ -29,6 +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_resource('seed', 6) r:set_resource('sapling', 17) r:set_resource('tree', 0) @@ -44,6 +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_resource('seed', 0) r:set_resource('sapling', 0) r:set_resource('tree', 0) @@ -64,6 +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_resource('seed', 0) r:set_resource('sapling', 0) r:set_resource('tree', 0) @@ -85,6 +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_resource('seed', 0) r:set_resource('sapling', 0) r:set_resource('tree', 0) @@ -112,6 +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_resource('seed', 0) r:set_resource('sapling', 0) r:set_resource('tree', 0)