mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add missing item alias metatables to async environment (#12458)
This commit is contained in:
parent
34f15259fa
commit
fc3460470a
6 changed files with 35 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue