From cd8a0343337bed0351d720aef465d4898f69f04a Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Sun, 13 Oct 2024 14:23:34 -0700 Subject: [PATCH] more tests --- .../commands/test/tests/credits.test.lua | 13 +++++++++++++ .../commands/test/tests/init.lua | 1 + .../commands/test/tests/notify.test.lua | 1 + .../commands/test/tests/stacktrace.test.lua | 0 4 files changed, 15 insertions(+) create mode 100644 worldeditadditions_commands/commands/test/tests/credits.test.lua create mode 100644 worldeditadditions_commands/commands/test/tests/stacktrace.test.lua diff --git a/worldeditadditions_commands/commands/test/tests/credits.test.lua b/worldeditadditions_commands/commands/test/tests/credits.test.lua new file mode 100644 index 0000000..eca6ed1 --- /dev/null +++ b/worldeditadditions_commands/commands/test/tests/credits.test.lua @@ -0,0 +1,13 @@ +local Notify = worldeditadditions_core.notify +return worldeditadditions.normalize_test("notify", { + params = "", + 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 +}) \ No newline at end of file diff --git a/worldeditadditions_commands/commands/test/tests/init.lua b/worldeditadditions_commands/commands/test/tests/init.lua index e94603f..0de4226 100644 --- a/worldeditadditions_commands/commands/test/tests/init.lua +++ b/worldeditadditions_commands/commands/test/tests/init.lua @@ -1,5 +1,6 @@ -- Test registry local test_id_paths = { + "credits.test.lua", "notify.test.lua", -- "stacktrace.test.lua", } diff --git a/worldeditadditions_commands/commands/test/tests/notify.test.lua b/worldeditadditions_commands/commands/test/tests/notify.test.lua index e8c9a9f..eca6ed1 100644 --- a/worldeditadditions_commands/commands/test/tests/notify.test.lua +++ b/worldeditadditions_commands/commands/test/tests/notify.test.lua @@ -8,5 +8,6 @@ return worldeditadditions.normalize_test("notify", { Notify.warn(name, message) Notify.ok(name, message) Notify.info(name, message) + Notify.custom(name, "@" .. name, "Good Job", "#FF00D7") end }) \ No newline at end of file diff --git a/worldeditadditions_commands/commands/test/tests/stacktrace.test.lua b/worldeditadditions_commands/commands/test/tests/stacktrace.test.lua new file mode 100644 index 0000000..e69de29