aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/unittests/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'games/minimal/mods/unittests/init.lua')
-rw-r--r--games/minimal/mods/unittests/init.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/games/minimal/mods/unittests/init.lua b/games/minimal/mods/unittests/init.lua
new file mode 100644
index 000000000..6c1728420
--- /dev/null
+++ b/games/minimal/mods/unittests/init.lua
@@ -0,0 +1,16 @@
+unittests = {}
+
+local modpath = minetest.get_modpath("unittests")
+dofile(modpath .. "/random.lua")
+dofile(modpath .. "/player.lua")
+dofile(modpath .. "/crafting_prepare.lua")
+dofile(modpath .. "/crafting.lua")
+
+if minetest.settings:get_bool("devtest_unittests_autostart", false) then
+ unittests.test_random()
+ unittests.test_crafting()
+ minetest.register_on_joinplayer(function(player)
+ unittests.test_player(player)
+ end)
+end
+