From c6ba91981c6ab07e3e8c13ffbc8ac69111a961c8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 10 Feb 2018 21:13:09 +0100 Subject: [PATCH] fix turn processing check --- scripts/tests/process.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/tests/process.lua b/scripts/tests/process.lua index 6288a8134..0006fcd74 100644 --- a/scripts/tests/process.lua +++ b/scripts/tests/process.lua @@ -2,11 +2,10 @@ require "lunit" module("tests.process", package.seeall, lunit.testcase) -local u, r, f, turn +local u, r, f function setup() eressea.free_game() - turn = get_turn() r = region.create(0, 0, "plain") f = faction.create("human", "bernd@eressea.de", "de") u = unit.create(f, r, 1) @@ -25,8 +24,11 @@ local function assert_file(filename, exists) end function test_process_turn() + turn = get_turn() + turn_begin() + assert_equal(turn+1, get_turn()) u:add_order("NUMMER PARTEI 777") - process_orders() + turn_process() assert_equal(0, init_reports()) assert_equal(0, write_reports()) assert_equal(0, eressea.write_game("test.dat")) @@ -37,5 +39,6 @@ function test_process_turn() assert_file("reports/reports.txt") os.remove("reports") os.remove("data") --- assert_equal(turn+1, get_turn()) + turn_end() + assert_equal(turn+1, get_turn()) end