From 1094e70de29f895f61b77a4b68381171edbebb7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 9 Nov 2025 21:23:37 +0100 Subject: [PATCH] tests: add unit tests on command `/command` --- tests/unit/core/test-core-command.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/unit/core/test-core-command.cpp b/tests/unit/core/test-core-command.cpp index 93b878be9..9d4f4bae1 100644 --- a/tests/unit/core/test-core-command.cpp +++ b/tests/unit/core/test-core-command.cpp @@ -555,7 +555,24 @@ TEST(CoreCommand, Color) TEST(CoreCommand, Command) { - /* TODO: write tests */ + WEE_CMD_CORE_MIN_ARGS("/command", "/command"); + WEE_CMD_CORE_MIN_ARGS("/command *", "/command"); + + /* /command -s */ + WEE_CMD_CORE("/command -s /print test1;/print test2"); + WEE_CHECK_MSG_CORE("", "test1"); + WEE_CHECK_MSG_CORE("", "test2"); + + /* /command -buffer */ + WEE_CMD_CORE_ERROR_MSG("/command -buffer xxx * /print test", + "Buffer \"xxx\" not found"); + + /* /command */ + WEE_CMD_CORE_ERROR_MSG("/command xxx /print test", "Plugin \"xxx\" not found"); + WEE_CMD_CORE("/command * /print test"); + WEE_CHECK_MSG_CORE("", "test"); + WEE_CMD_CORE("/command * print test"); + WEE_CHECK_MSG_CORE("", "test"); } /*