aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/unittests/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'games/devtest/mods/unittests/init.lua')
-rw-r--r--games/devtest/mods/unittests/init.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/games/devtest/mods/unittests/init.lua b/games/devtest/mods/unittests/init.lua
index 0754d507f..0e041be76 100644
--- a/games/devtest/mods/unittests/init.lua
+++ b/games/devtest/mods/unittests/init.lua
@@ -36,6 +36,7 @@ local function await(invoke)
called_early = {...}
else
coroutine.resume(co, ...)
+ co = nil
end
end)
if called_early ~= true then
@@ -112,7 +113,7 @@ local function wait_for_map(player, callback)
if core.get_node_or_nil(player:get_pos()) ~= nil then
callback()
else
- minetest.after(0, check)
+ core.after(0, check)
end
end
check()
@@ -170,11 +171,13 @@ end
--------------
-local modpath = minetest.get_modpath("unittests")
+local modpath = core.get_modpath("unittests")
dofile(modpath .. "/misc.lua")
dofile(modpath .. "/player.lua")
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/itemdescription.lua")
+dofile(modpath .. "/async_env.lua")
+dofile(modpath .. "/entity.lua")
--------------
@@ -183,7 +186,7 @@ if core.settings:get_bool("devtest_unittests_autostart", false) then
coroutine.wrap(unittests.run_all)()
end)
else
- minetest.register_chatcommand("unittests", {
+ core.register_chatcommand("unittests", {
privs = {basic_privs=true},
description = "Runs devtest unittests (may modify player or map state)",
func = function(name, param)