]> git.lizzy.rs Git - minetest.git/blobdiff - games/devtest/mods/unittests/misc.lua
Add `minetest.get_game_info` and allow reading `game.conf` (#12989)
[minetest.git] / games / devtest / mods / unittests / misc.lua
index 8ac3ed110502cae71dbc10ebcd692eb23eb243b9..7c16b7c8201e20c76432083a4146754544ac3cc1 100644 (file)
@@ -103,3 +103,10 @@ local function test_compress()
 end
 unittests.register("test_compress", test_compress)
 
+local function test_game_info()
+       local info = minetest.get_game_info()
+       local game_conf = Settings(info.path .. "/game.conf")
+       assert(info.id == "devtest")
+       assert(info.title == game_conf:get("title"))
+end
+unittests.register("test_game_info", test_game_info)