diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-19 23:31:49 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-10-19 23:38:28 +0200 |
commit | a88b8f7ed21ab796a7b041a138bc0f4fe2bba06a (patch) | |
tree | 860bb39cb3349f3ba2acaf97be6a07a9b21af330 /tests/unit | |
parent | 1896c50c116919db882c40b778aa887035f5c11b (diff) | |
download | weechat-a88b8f7ed21ab796a7b041a138bc0f4fe2bba06a.zip |
irc: revert compute of nick colors to case sensitive way, deprecate again IRC nick color infos (issue #194, issue #2032)
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-nick.cpp | 71 |
1 files changed, 1 insertions, 70 deletions
diff --git a/tests/unit/plugins/irc/test-irc-nick.cpp b/tests/unit/plugins/irc/test-irc-nick.cpp index 9d8f4ea0c..d35362064 100644 --- a/tests/unit/plugins/irc/test-irc-nick.cpp +++ b/tests/unit/plugins/irc/test-irc-nick.cpp @@ -184,76 +184,7 @@ TEST(IrcNick, IsNick) TEST(IrcNick, IrcNickFindColor) { - struct t_irc_server *server; - char *str, str_color[128]; - - server = irc_server_alloc ("my_ircd"); - CHECK(server); - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("default")); - - WEE_TEST_STR(str_color, irc_nick_find_color (NULL, NULL)); - WEE_TEST_STR("default", irc_nick_find_color_name (NULL, NULL)); - - WEE_TEST_STR(str_color, irc_nick_find_color (server, NULL)); - WEE_TEST_STR("default", irc_nick_find_color_name (server, NULL)); - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("142")); - WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "NICK]")); - WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "nick}")); - WEE_TEST_STR("142", irc_nick_find_color_name (NULL, "NICK]")); - WEE_TEST_STR("142", irc_nick_find_color_name (NULL, "nick}")); - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan")); - WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "NICK^A")); - WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "nick~a")); - WEE_TEST_STR("lightcyan", irc_nick_find_color_name (NULL, "NICK^A")); - WEE_TEST_STR("lightcyan", irc_nick_find_color_name (NULL, "nick~a")); - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("142")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK]")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick}")); - WEE_TEST_STR("142", irc_nick_find_color_name (server, "NICK]")); - WEE_TEST_STR("142", irc_nick_find_color_name (server, "nick}")); - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK^A")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick~a")); - WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "NICK^A")); - WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "nick~a")); - - server->casemapping = IRC_SERVER_CASEMAPPING_STRICT_RFC1459; - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("142")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK]")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick}")); - WEE_TEST_STR("142", irc_nick_find_color_name (server, "NICK]")); - WEE_TEST_STR("142", irc_nick_find_color_name (server, "nick}")); - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("176")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK^A")); - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick~a")); - WEE_TEST_STR("176", irc_nick_find_color_name (server, "NICK^A")); - WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "nick~a")); - - server->casemapping = IRC_SERVER_CASEMAPPING_ASCII; - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("169")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK]")); - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("142")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick}")); - WEE_TEST_STR("169", irc_nick_find_color_name (server, "NICK]")); - WEE_TEST_STR("142", irc_nick_find_color_name (server, "nick}")); - - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("176")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK^A")); - snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan")); - WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick~a")); - WEE_TEST_STR("176", irc_nick_find_color_name (server, "NICK^A")); - WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "nick~a")); - - irc_server_free (server); + /* TODO: write tests */ } /* |