mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Add missing item alias metatables to async environment (#12458)
This commit is contained in:
@@ -2,7 +2,7 @@ unittests = {}
|
||||
|
||||
core.log("info", "Hello World")
|
||||
|
||||
function unittests.async_test()
|
||||
local function do_tests()
|
||||
assert(core == minetest)
|
||||
-- stuff that should not be here
|
||||
assert(not core.get_player_by_name)
|
||||
@@ -11,5 +11,15 @@ function unittests.async_test()
|
||||
-- stuff that should be here
|
||||
assert(ItemStack)
|
||||
assert(core.registered_items[""])
|
||||
return true
|
||||
-- alias handling
|
||||
assert(core.registered_items["unittests:steel_ingot_alias"].name ==
|
||||
"unittests:steel_ingot")
|
||||
end
|
||||
|
||||
function unittests.async_test()
|
||||
local ok, err = pcall(do_tests)
|
||||
if not ok then
|
||||
core.log("error", err)
|
||||
end
|
||||
return ok
|
||||
end
|
||||
|
Reference in New Issue
Block a user