mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add minetest.get_game_info
and allow reading game.conf
(#12989)
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
3fd5bff128
commit
d0a118f5b1
7 changed files with 52 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue