mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-23 03:55:01 +00:00
moved handle_fn_result
This commit is contained in:
parent
3d205fadb7
commit
2354e51ba6
3 changed files with 6 additions and 4 deletions
|
@ -7,10 +7,10 @@
|
|||
local wea_c = worldeditadditions_core
|
||||
local wea_cmd = worldeditadditions_commands
|
||||
|
||||
local test_dir = wea_cmd.modpath .. "/commands/test/tests/"
|
||||
local test_dir = wea_cmd.modpath .. "/commands/test/"
|
||||
|
||||
-- Load tests with init function
|
||||
dofile(test_dir .. "init.lua")(test_dir)
|
||||
dofile(test_dir .. "tests/init.lua")(test_dir)
|
||||
local tests = worldeditadditions.normalize_test.get_registered_tests()
|
||||
|
||||
-- Helper functions
|
||||
|
@ -18,6 +18,9 @@ local set_colour = function(colour, text)
|
|||
return minetest.colorize(colour, text)
|
||||
end
|
||||
|
||||
local handle_fn_result = dofile(test_dir .. "helpers/handle_fn_result.lua")
|
||||
|
||||
-- Main command
|
||||
wea_c.register_command("test", {
|
||||
params = "list || <testname> <args> || help <testname>",
|
||||
description = "Run a test or list all tests",
|
||||
|
@ -59,7 +62,7 @@ wea_c.register_command("test", {
|
|||
tests[params_text[1]]:help()}, " ")
|
||||
end
|
||||
end
|
||||
return wea_c.format.handle_fn_result(
|
||||
return handle_fn_result(
|
||||
tests[subcommand](name, params_text)
|
||||
)
|
||||
end
|
||||
|
|
|
@ -4,7 +4,6 @@ local wea_c = worldeditadditions_core
|
|||
wea_c.format = {
|
||||
array_2d = dofile(wea_c.modpath.."/utils/format/array_2d.lua"),
|
||||
escape = dofile(wea_c.modpath.."/utils/format/escape.lua"),
|
||||
handle_fn_result = dofile(wea_c.modpath.."/utils/format/handle_fn_result.lua"),
|
||||
human_size = dofile(wea_c.modpath.."/utils/format/human_size.lua"),
|
||||
human_time = dofile(wea_c.modpath.."/utils/format/human_time.lua"),
|
||||
make_ascii_table = dofile(wea_c.modpath.."/utils/format/make_ascii_table.lua"),
|
||||
|
|
Loading…
Reference in a new issue