Minetest-WorldEditAdditions/worldeditadditions_commands/commands/test/tests/init.lua

21 lines
379 B
Lua
Raw Normal View History

2024-10-13 20:54:02 +00:00
-- Test registry
local test_id_paths = {
2024-10-13 21:23:34 +00:00
"credits.test.lua",
2024-10-13 20:54:02 +00:00
"notify.test.lua",
2024-10-15 02:14:18 +00:00
"notify_bad.test.lua",
2024-10-13 20:54:02 +00:00
-- "stacktrace.test.lua",
}
-- Helper functions
local update = function(a,k,v) a[k] = v end
-- Test loader
local test_loader = function (path)
local ret = {}
for _, v in ipairs(test_id_paths) do
update(ret, dofile(path .. v))
end
return ret
end
return test_loader