1
0
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:
OgelGames
2024-04-27 12:46:38 +10:00
parent 9564da4a04
commit fe330e6d83

View File

@@ -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)