summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/plugins/irc/test-irc-nick.cpp71
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 */
}
/*