1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 16:23:14 +02:00

tests: add tests on functions gui_buffer_search_type and gui_buffer_search_notify

This commit is contained in:
Sébastien Helleu
2022-03-13 13:49:18 +01:00
parent 4629b17173
commit 44ec7e8cfa
+14 -2
View File
@@ -45,7 +45,12 @@ TEST_GROUP(GuiBuffer)
TEST(GuiBuffer, SearchType)
{
/* TODO: write tests */
LONGS_EQUAL(-1, gui_buffer_search_type (NULL));
LONGS_EQUAL(-1, gui_buffer_search_type (""));
LONGS_EQUAL(-1, gui_buffer_search_type ("invalid"));
LONGS_EQUAL(GUI_BUFFER_TYPE_FORMATTED, gui_buffer_search_type ("formatted"));
LONGS_EQUAL(GUI_BUFFER_TYPE_FREE, gui_buffer_search_type ("free"));
}
/*
@@ -55,7 +60,14 @@ TEST(GuiBuffer, SearchType)
TEST(GuiBuffer, SearchNotify)
{
/* TODO: write tests */
LONGS_EQUAL(-1, gui_buffer_search_notify (NULL));
LONGS_EQUAL(-1, gui_buffer_search_notify (""));
LONGS_EQUAL(-1, gui_buffer_search_notify ("invalid"));
LONGS_EQUAL(GUI_BUFFER_NOTIFY_NONE, gui_buffer_search_notify ("none"));
LONGS_EQUAL(GUI_BUFFER_NOTIFY_HIGHLIGHT, gui_buffer_search_notify ("highlight"));
LONGS_EQUAL(GUI_BUFFER_NOTIFY_MESSAGE, gui_buffer_search_notify ("message"));
LONGS_EQUAL(GUI_BUFFER_NOTIFY_ALL, gui_buffer_search_notify ("all"));
}
/*