From 649e662331d87e86f320400c355a67dbd5d4e84d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 2 May 2020 11:13:26 +0200 Subject: [PATCH] re-enable missing tests in E2 --- scripts/tests/e2/trees.lua | 10 +++++++--- scripts/tests/e2/trolls.lua | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/tests/e2/trees.lua b/scripts/tests/e2/trees.lua index 739d9f1e6..21f7611cd 100644 --- a/scripts/tests/e2/trees.lua +++ b/scripts/tests/e2/trees.lua @@ -1,6 +1,10 @@ -require "lunit" - -module("tests.e2.trees", package.seeall, lunit.testcase ) +local tcname = 'tests.e2.trees' +local lunit = require("lunit") +if _VERSION >= 'Lua 5.2' then + _ENV = module(tcname, 'seeall') +else + module(tcname, 'seeall') +end function setup() eressea.game.reset() diff --git a/scripts/tests/e2/trolls.lua b/scripts/tests/e2/trolls.lua index b6d96b015..811f1f736 100644 --- a/scripts/tests/e2/trolls.lua +++ b/scripts/tests/e2/trolls.lua @@ -1,6 +1,10 @@ -require "lunit" - -module("tests.e2.trolls", package.seeall, lunit.testcase ) +local tcname = 'tests.e2.trolls' +local lunit = require("lunit") +if _VERSION >= 'Lua 5.2' then + _ENV = module(tcname, 'seeall') +else + module(tcname, 'seeall') +end function setup() eressea.free_game()