mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 09:03:01 +00:00
more tests
This commit is contained in:
parent
ef1189e6db
commit
cd8a034333
4 changed files with 15 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
||||||
|
local Notify = worldeditadditions_core.notify
|
||||||
|
return worldeditadditions.normalize_test("notify", {
|
||||||
|
params = "<message>",
|
||||||
|
description = "Sends message to player in all main notification formats (error, warn, ok, info).",
|
||||||
|
func = function(name, params_table)
|
||||||
|
local message = table.concat(params_table, " ")
|
||||||
|
Notify.error(name, message)
|
||||||
|
Notify.warn(name, message)
|
||||||
|
Notify.ok(name, message)
|
||||||
|
Notify.info(name, message)
|
||||||
|
Notify.custom(name, "@" .. name, "Good Job", "#FF00D7")
|
||||||
|
end
|
||||||
|
})
|
|
@ -1,5 +1,6 @@
|
||||||
-- Test registry
|
-- Test registry
|
||||||
local test_id_paths = {
|
local test_id_paths = {
|
||||||
|
"credits.test.lua",
|
||||||
"notify.test.lua",
|
"notify.test.lua",
|
||||||
-- "stacktrace.test.lua",
|
-- "stacktrace.test.lua",
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,6 @@ return worldeditadditions.normalize_test("notify", {
|
||||||
Notify.warn(name, message)
|
Notify.warn(name, message)
|
||||||
Notify.ok(name, message)
|
Notify.ok(name, message)
|
||||||
Notify.info(name, message)
|
Notify.info(name, message)
|
||||||
|
Notify.custom(name, "@" .. name, "Good Job", "#FF00D7")
|
||||||
end
|
end
|
||||||
})
|
})
|
Loading…
Reference in a new issue