summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorLars Müller <34514239+appgurueu@users.noreply.github.com>2022-07-14 20:51:42 +0200
committerGitHub <noreply@github.com>2022-07-14 20:51:42 +0200
commitb204655081f495c9d45fdf7d49d203e910dafc7a (patch)
treef130c52ed479eb1ba0f2d5facacdc4f5c7ed64de /games
parentf4c6ed863d6231e184f1d003b4b3f6e8380e6bba (diff)
downloadminetest-b204655081f495c9d45fdf7d49d203e910dafc7a.tar.gz
minetest-b204655081f495c9d45fdf7d49d203e910dafc7a.tar.bz2
minetest-b204655081f495c9d45fdf7d49d203e910dafc7a.zip
Fix regression & replace more occurrences of vector.new with vector.copy (#12539)
Diffstat (limited to 'games')
-rw-r--r--games/devtest/mods/unittests/misc.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/games/devtest/mods/unittests/misc.lua b/games/devtest/mods/unittests/misc.lua
index 9ddb07061..4811c8008 100644
--- a/games/devtest/mods/unittests/misc.lua
+++ b/games/devtest/mods/unittests/misc.lua
@@ -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})