init.lua 500 B

123456789101112131415161718
  1. unittests = {}
  2. local modpath = minetest.get_modpath("unittests")
  3. dofile(modpath .. "/random.lua")
  4. dofile(modpath .. "/player.lua")
  5. dofile(modpath .. "/crafting_prepare.lua")
  6. dofile(modpath .. "/crafting.lua")
  7. dofile(modpath .. "/itemdescription.lua")
  8. if minetest.settings:get_bool("devtest_unittests_autostart", false) then
  9. unittests.test_random()
  10. unittests.test_crafting()
  11. unittests.test_short_desc()
  12. minetest.register_on_joinplayer(function(player)
  13. unittests.test_player(player)
  14. end)
  15. end