diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-11 22:52:54 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-04-11 22:52:54 +0200 |
commit | b0b733a8f0af0adcd268ddb161f0c5b9269dcfad (patch) | |
tree | 31fe14e2691655d683478c1da3a3279447060c5c /tests | |
parent | ae892d2893aa78e5c9674aed0134c9ef64a518ef (diff) | |
download | weechat-b0b733a8f0af0adcd268ddb161f0c5b9269dcfad.zip |
core: use nick offline color for nick in action message
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/gui/test-gui-line.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/unit/gui/test-gui-line.cpp b/tests/unit/gui/test-gui-line.cpp index bc3aa1c64..ecae7783f 100644 --- a/tests/unit/gui/test-gui-line.cpp +++ b/tests/unit/gui/test-gui-line.cpp @@ -21,6 +21,8 @@ #include "CppUTest/TestHarness.h" +#include "tests/tests.h" + extern "C" { #include <string.h> @@ -212,6 +214,29 @@ TEST(GuiLine, BuildStringPrefixMessage) /* * Tests functions: + * gui_line_build_string_message_nick_offline + */ + +TEST(GuiLine, BuildStringMessageNickOffline) +{ + char *str, str_msg_expected[256], str_msg[256]; + + POINTERS_EQUAL(NULL, gui_line_build_string_message_nick_offline (NULL)); + WEE_TEST_STR("", gui_line_build_string_message_nick_offline ("")); + + snprintf (str_msg_expected, sizeof (str_msg_expected), + "%stest", + GUI_COLOR(GUI_COLOR_CHAT_NICK_OFFLINE)); + WEE_TEST_STR(str_msg_expected, gui_line_build_string_message_nick_offline ("test")); + + snprintf (str_msg, sizeof (str_msg), + "%stest", + gui_color_get_custom ("blue")); + WEE_TEST_STR(str_msg_expected, gui_line_build_string_message_nick_offline (str_msg)); +} + +/* + * Tests functions: * gui_line_build_string_message_tags */ |