mirror of
https://github.com/luanti-org/luanti.git
synced 2026-01-11 03:35:26 +01:00
add remove_detached_inventory call and test it too
This commit is contained in:
@@ -64,6 +64,10 @@ local function test_inventory()
|
||||
pcall(inv.set_list, inv, "test", true)
|
||||
local after = inv:get_list("test")
|
||||
assert(compare_lists(before, after))
|
||||
|
||||
local location = inv:get_location()
|
||||
assert(minetest.remove_detached_inventory("test"))
|
||||
assert(not minetest.get_inventory(location))
|
||||
end
|
||||
|
||||
unittests.register("test_inventory", test_inventory)
|
||||
|
||||
Reference in New Issue
Block a user