mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Async environment for mods to do concurrent tasks (#11131)
This commit is contained in:
15
games/devtest/mods/unittests/inside_async_env.lua
Normal file
15
games/devtest/mods/unittests/inside_async_env.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
unittests = {}
|
||||
|
||||
core.log("info", "Hello World")
|
||||
|
||||
function unittests.async_test()
|
||||
assert(core == minetest)
|
||||
-- stuff that should not be here
|
||||
assert(not core.get_player_by_name)
|
||||
assert(not core.set_node)
|
||||
assert(not core.object_refs)
|
||||
-- stuff that should be here
|
||||
assert(ItemStack)
|
||||
assert(core.registered_items[""])
|
||||
return true
|
||||
end
|
Reference in New Issue
Block a user