1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Fix regression & replace more occurrences of vector.new with vector.copy (#12539)

This commit is contained in:
Lars Müller 2022-07-14 20:51:42 +02:00 committed by GitHub
parent f4c6ed863d
commit b204655081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 14 deletions

View file

@ -68,3 +68,15 @@ local function test_clear_meta(_, pos)
end
end
unittests.register("test_clear_meta", test_clear_meta, {map=true})
local on_punch_called
minetest.register_on_punchnode(function()
on_punch_called = true
end)
unittests.register("test_punch_node", function(_, pos)
minetest.place_node(pos, {name="basenodes:dirt"})
on_punch_called = false
minetest.punch_node(pos)
minetest.remove_node(pos)
-- currently failing: assert(on_punch_called)
end, {map=true})