summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/en/weechat_dev.en.adoc1
-rw-r--r--doc/fr/weechat_dev.fr.adoc1
-rw-r--r--doc/ja/weechat_dev.ja.adoc2
-rw-r--r--doc/sr/weechat_dev.sr.adoc2
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/scripts/python/testapi.py18
-rw-r--r--tests/tests.cpp1
-rw-r--r--tests/unit/gui/test-gui-buffer.cpp1281
9 files changed, 1303 insertions, 5 deletions
diff --git a/doc/en/weechat_dev.en.adoc b/doc/en/weechat_dev.en.adoc
index 894da3f02..56876064a 100644
--- a/doc/en/weechat_dev.en.adoc
+++ b/doc/en/weechat_dev.en.adoc
@@ -422,6 +422,7 @@ WeeChat "core" is located in following directories:
|          test-core-utf8.cpp | Tests: UTF-8.
|          test-core-util.cpp | Tests: utility functions.
|       gui/ | Root of unit tests for interfaces.
+|          test-gui-buffer.cpp | Tests: buffer functions.
|          test-gui-chat.cpp | Tests: chat functions.
|          test-gui-color.cpp | Tests: colors.
|          test-gui-line.cpp | Tests: lines.
diff --git a/doc/fr/weechat_dev.fr.adoc b/doc/fr/weechat_dev.fr.adoc
index 3dea7de28..99b400fe6 100644
--- a/doc/fr/weechat_dev.fr.adoc
+++ b/doc/fr/weechat_dev.fr.adoc
@@ -424,6 +424,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|          test-core-utf8.cpp | Tests : UTF-8.
|          test-core-util.cpp | Tests : fonctions utiles.
|       gui/ | Racine des tests unitaires pour les interfaces.
+|          test-gui-buffer.cpp | Tests : tampons.
|          test-gui-chat.cpp | Tests : fonctions de discussion.
|          test-gui-color.cpp | Tests : couleurs.
|          test-gui-line.cpp | Tests : lignes.
diff --git a/doc/ja/weechat_dev.ja.adoc b/doc/ja/weechat_dev.ja.adoc
index 84719fffe..338628eb4 100644
--- a/doc/ja/weechat_dev.ja.adoc
+++ b/doc/ja/weechat_dev.ja.adoc
@@ -450,6 +450,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|          test-core-util.cpp | テスト: ユーティリティ関数
|       gui/ | インターフェースの単体テストを収める最上位ディレクトリ
// TRANSLATION MISSING
+|          test-gui-buffer.cpp | Tests: buffer functions.
+// TRANSLATION MISSING
|          test-gui-chat.cpp | Tests: chat functions.
// TRANSLATION MISSING
|          test-gui-color.cpp | Tests: colors.
diff --git a/doc/sr/weechat_dev.sr.adoc b/doc/sr/weechat_dev.sr.adoc
index 0fdcd0dd2..2ea18b176 100644
--- a/doc/sr/weechat_dev.sr.adoc
+++ b/doc/sr/weechat_dev.sr.adoc
@@ -424,6 +424,8 @@ WeeChat „језгро” се налази у следећим директо
|          test-core-utf8.cpp | Тестови: UTF-8.
|          test-core-util.cpp | Тестови: помоћне функције.
|       gui/ | Корен unit тестова интерфејса.
+// TRANSLATION MISSING
+|          test-gui-buffer.cpp | Tests: buffer functions.
|          test-gui-chat.cpp | Тестови: чет функције.
|          test-gui-color.cpp | Тестови: боје.
|          test-gui-line.cpp | Тестови: линије.
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 997f85f9d..b46c1184b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -42,6 +42,7 @@ set(LIB_WEECHAT_UNIT_TESTS_CORE_SRC
unit/core/test-core-url.cpp
unit/core/test-core-utf8.cpp
unit/core/test-core-util.cpp
+ unit/gui/test-gui-buffer.cpp
unit/gui/test-gui-chat.cpp
unit/gui/test-gui-color.cpp
unit/gui/test-gui-line.cpp
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0e48ef45b..01b6b2e06 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -39,6 +39,7 @@ lib_weechat_unit_tests_core_a_SOURCES = unit/core/test-core-arraylist.cpp \
unit/core/test-core-url.cpp \
unit/core/test-core-utf8.cpp \
unit/core/test-core-util.cpp \
+ unit/gui/test-gui-buffer.cpp \
unit/gui/test-gui-chat.cpp \
unit/gui/test-gui-color.cpp \
unit/gui/test-gui-line.cpp \
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py
index 4be516319..79c0763bb 100644
--- a/tests/scripts/python/testapi.py
+++ b/tests/scripts/python/testapi.py
@@ -168,11 +168,19 @@ def test_display():
check(weechat.prefix('unknown') == '')
check(weechat.color('green') != '')
check(weechat.color('unknown') == '')
- weechat.prnt('', '## test prnt')
- weechat.prnt_date_tags('', 946681200, 'tag1,tag2', '## test prnt_date_tags')
- buffer = weechat.buffer_new('test_free', 'buffer_input_cb', '', 'buffer_close_cb', '')
- weechat.prnt_y(buffer, 0, '## test prnt_y')
- weechat.prnt_y_date_tags(buffer, 0, 946681200, 'tag1,tag2', '## test prnt_y_date_tags')
+ weechat.prnt('', '## test print core buffer')
+ weechat.prnt_date_tags('', 946681200, 'tag1,tag2', '## test print_date_tags core buffer')
+ buffer = weechat.buffer_new('test_formatted', 'buffer_input_cb', '', 'buffer_close_cb', '')
+ check(buffer != '')
+ check(weechat.buffer_get_integer(buffer, 'type') == 0)
+ weechat.prnt(buffer, '## test print formatted buffer')
+ weechat.prnt_date_tags(buffer, 946681200, 'tag1,tag2', '## test print_date_tags formatted buffer')
+ weechat.buffer_close(buffer)
+ buffer = weechat.buffer_new_props('test_free', {'type': 'free'}, 'buffer_input_cb', '', 'buffer_close_cb', '')
+ check(weechat.buffer_get_integer(buffer, 'type') == 1)
+ check(buffer != '')
+ weechat.prnt_y(buffer, 0, '## test print_y free buffer')
+ weechat.prnt_y_date_tags(buffer, 0, 946681200, 'tag1,tag2', '## test print_y_date_tags free buffer')
weechat.buffer_close(buffer)
diff --git a/tests/tests.cpp b/tests/tests.cpp
index 87371973f..923d5caca 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -79,6 +79,7 @@ IMPORT_TEST_GROUP(CoreUrl);
IMPORT_TEST_GROUP(CoreUtf8);
IMPORT_TEST_GROUP(CoreUtil);
/* GUI */
+IMPORT_TEST_GROUP(GuiBuffer);
IMPORT_TEST_GROUP(GuiChat);
IMPORT_TEST_GROUP(GuiColor);
IMPORT_TEST_GROUP(GuiLine);
diff --git a/tests/unit/gui/test-gui-buffer.cpp b/tests/unit/gui/test-gui-buffer.cpp
new file mode 100644
index 000000000..93b1a10b8
--- /dev/null
+++ b/tests/unit/gui/test-gui-buffer.cpp
@@ -0,0 +1,1281 @@
+/*
+ * test-gui-buffer.cpp - test buffer functions
+ *
+ * Copyright (C) 2022 Sébastien Helleu <flashcode@flashtux.org>
+ *
+ * This file is part of WeeChat, the extensible chat client.
+ *
+ * WeeChat is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * WeeChat is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "CppUTest/TestHarness.h"
+
+extern "C"
+{
+#include <string.h>
+#include "src/core/wee-hashtable.h"
+#include "src/gui/gui-buffer.h"
+#include "src/gui/gui-key.h"
+#include "src/gui/gui-line.h"
+#include "src/gui/gui-nicklist.h"
+#include "src/plugins/plugin.h"
+}
+
+#define TEST_BUFFER_NAME "test"
+
+TEST_GROUP(GuiBuffer)
+{
+};
+
+/*
+ * Tests functions:
+ * gui_buffer_search_type
+ */
+
+TEST(GuiBuffer, SearchType)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_notify
+ */
+
+TEST(GuiBuffer, SearchNotify)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_get_plugin_name
+ */
+
+TEST(GuiBuffer, GetPluginName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_get_short_name
+ */
+
+TEST(GuiBuffer, GetShortName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_build_full_name
+ */
+
+TEST(GuiBuffer, BuildFullName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_local_var_add
+ */
+
+TEST(GuiBuffer, LocalVarAdd)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_local_var_remove
+ */
+
+TEST(GuiBuffer, LocalVarRemove)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_local_var_remove_all
+ */
+
+TEST(GuiBuffer, LocalVarRemoveAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_notify_get
+ */
+
+TEST(GuiBuffer, NotifyGet)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_notify_set
+ */
+
+TEST(GuiBuffer, NotifySet)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_notify_set_all
+ */
+
+TEST(GuiBuffer, NotifySetAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_find_pos
+ */
+
+TEST(GuiBuffer, FindPos)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_shift_numbers
+ */
+
+TEST(GuiBuffer, ShiftNumbers)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_insert
+ */
+
+TEST(GuiBuffer, Insert)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_input_buffer_init
+ */
+
+TEST(GuiBuffer, InputBufferInit)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_is_reserved_name
+ */
+
+TEST(GuiBuffer, IsReservedName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_apply_properties_cb
+ */
+
+TEST(GuiBuffer, ApplyPropertiesCb)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Test callback for buffer input.
+ */
+
+
+int
+test_buffer_input_cb (const void *pointer, void *data,
+ struct t_gui_buffer *buffer, const char *input_data)
+{
+ /* make C++ compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) buffer;
+ (void) input_data;
+
+ return WEECHAT_RC_OK;
+}
+
+/*
+ * Test callback for buffer close.
+ */
+
+int
+test_buffer_close_cb (const void *pointer, void *data,
+ struct t_gui_buffer *buffer)
+{
+ /* make C++ compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) buffer;
+
+ return WEECHAT_RC_OK;
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_new_props
+ */
+
+TEST(GuiBuffer, NewProps)
+{
+ struct t_hashtable *properties;
+ struct t_gui_buffer *buffer;
+
+ properties = hashtable_new (32,
+ WEECHAT_HASHTABLE_STRING,
+ WEECHAT_HASHTABLE_STRING,
+ NULL,
+ NULL);
+ hashtable_set (properties, "type", "free");
+ buffer = gui_buffer_new_props (NULL, TEST_BUFFER_NAME, properties,
+ &test_buffer_input_cb, NULL, NULL,
+ &test_buffer_close_cb, NULL, NULL);
+ CHECK(buffer);
+ POINTERS_EQUAL(NULL, buffer->plugin);
+ POINTERS_EQUAL(NULL, buffer->plugin_name_for_upgrade);
+ LONGS_EQUAL(2, buffer->number);
+ LONGS_EQUAL(0, buffer->layout_number);
+ LONGS_EQUAL(0, buffer->layout_number_merge_order);
+ STRCMP_EQUAL(TEST_BUFFER_NAME, buffer->name);
+ STRCMP_EQUAL("core." TEST_BUFFER_NAME, buffer->full_name);
+ POINTERS_EQUAL(NULL, buffer->old_full_name);
+ POINTERS_EQUAL(NULL, buffer->short_name);
+ LONGS_EQUAL(GUI_BUFFER_TYPE_FREE, buffer->type);
+ LONGS_EQUAL(GUI_BUFFER_NOTIFY_ALL, buffer->notify);
+ LONGS_EQUAL(0, buffer->num_displayed);
+ LONGS_EQUAL(1, buffer->active);
+ LONGS_EQUAL(0, buffer->hidden);
+ LONGS_EQUAL(0, buffer->zoomed);
+ LONGS_EQUAL(1, buffer->print_hooks_enabled);
+ LONGS_EQUAL(1, buffer->day_change);
+ LONGS_EQUAL(0, buffer->clear);
+ LONGS_EQUAL(1, buffer->filter);
+ POINTERS_EQUAL(&test_buffer_close_cb, buffer->close_callback);
+ POINTERS_EQUAL(NULL, buffer->close_callback_pointer);
+ POINTERS_EQUAL(NULL, buffer->close_callback_data);
+ LONGS_EQUAL(0, buffer->closing);
+ POINTERS_EQUAL(NULL, buffer->title);
+ CHECK(buffer->own_lines);
+ POINTERS_EQUAL(NULL, buffer->own_lines->first_line);
+ POINTERS_EQUAL(NULL, buffer->own_lines->last_line);
+ POINTERS_EQUAL(NULL, buffer->own_lines->last_read_line);
+ LONGS_EQUAL(0, buffer->time_for_each_line);
+ LONGS_EQUAL(2, buffer->chat_refresh_needed);
+ LONGS_EQUAL(0, buffer->nicklist);
+ LONGS_EQUAL(0, buffer->nicklist_case_sensitive);
+ CHECK(buffer->nicklist_root);
+ STRCMP_EQUAL("root", buffer->nicklist_root->name);
+ LONGS_EQUAL(0, buffer->nicklist_max_length);
+ LONGS_EQUAL(1, buffer->nicklist_display_groups);
+ LONGS_EQUAL(0, buffer->nicklist_count);
+ LONGS_EQUAL(0, buffer->nicklist_visible_count);
+ LONGS_EQUAL(0, buffer->nicklist_groups_count);
+ LONGS_EQUAL(0, buffer->nicklist_groups_visible_count);
+ LONGS_EQUAL(0, buffer->nicklist_nicks_count);
+ LONGS_EQUAL(0, buffer->nicklist_nicks_visible_count);
+ POINTERS_EQUAL(NULL, buffer->nickcmp_callback);
+ POINTERS_EQUAL(NULL, buffer->nickcmp_callback_pointer);
+ POINTERS_EQUAL(NULL, buffer->nickcmp_callback_data);
+ LONGS_EQUAL(1, buffer->input);
+ POINTERS_EQUAL(&test_buffer_input_cb, buffer->input_callback);
+ POINTERS_EQUAL(NULL, buffer->input_callback_pointer);
+ POINTERS_EQUAL(NULL, buffer->input_callback_data);
+ LONGS_EQUAL(0, buffer->input_get_unknown_commands);
+ LONGS_EQUAL(0, buffer->input_get_empty);
+ LONGS_EQUAL(0, buffer->input_multiline);
+ STRCMP_EQUAL("", buffer->input_buffer);
+ CHECK(buffer->input_buffer_alloc > 0);
+ LONGS_EQUAL(0, buffer->input_buffer_size);
+ LONGS_EQUAL(0, buffer->input_buffer_length);
+ LONGS_EQUAL(0, buffer->input_buffer_pos);
+ LONGS_EQUAL(0, buffer->input_buffer_1st_display);
+ CHECK(buffer->input_undo_snap);
+ POINTERS_EQUAL(NULL, buffer->input_undo_snap->data);
+ LONGS_EQUAL(0, buffer->input_undo_snap->pos);
+ POINTERS_EQUAL(NULL, buffer->input_undo_snap->prev_undo);
+ POINTERS_EQUAL(NULL, buffer->input_undo_snap->next_undo);
+ POINTERS_EQUAL(NULL, buffer->input_undo);
+ POINTERS_EQUAL(NULL, buffer->last_input_undo);
+ POINTERS_EQUAL(NULL, buffer->ptr_input_undo);
+ LONGS_EQUAL(0, buffer->input_undo_count);
+ CHECK(buffer->completion);
+ POINTERS_EQUAL(NULL, buffer->history);
+ POINTERS_EQUAL(NULL, buffer->last_history);
+ POINTERS_EQUAL(NULL, buffer->ptr_history);
+ LONGS_EQUAL(0, buffer->num_history);
+ LONGS_EQUAL(GUI_TEXT_SEARCH_DISABLED, buffer->text_search);
+ LONGS_EQUAL(0, buffer->text_search_exact);
+ LONGS_EQUAL(0, buffer->text_search_regex);
+ POINTERS_EQUAL(NULL, buffer->text_search_regex_compiled);
+ LONGS_EQUAL(0, buffer->text_search_where);
+ LONGS_EQUAL(0, buffer->text_search_found);
+ POINTERS_EQUAL(NULL, buffer->text_search_input);
+ POINTERS_EQUAL(NULL, buffer->highlight_words);
+ POINTERS_EQUAL(NULL, buffer->highlight_regex);
+ POINTERS_EQUAL(NULL, buffer->highlight_regex_compiled);
+ POINTERS_EQUAL(NULL, buffer->highlight_tags_restrict);
+ LONGS_EQUAL(0, buffer->highlight_tags_restrict_count);
+ POINTERS_EQUAL(NULL, buffer->highlight_tags_restrict_array);
+ POINTERS_EQUAL(NULL, buffer->highlight_tags);
+ LONGS_EQUAL(0, buffer->highlight_tags_count);
+ POINTERS_EQUAL(NULL, buffer->highlight_tags_array);
+ POINTERS_EQUAL(NULL, buffer->hotlist);
+ POINTERS_EQUAL(NULL, buffer->hotlist_removed);
+ CHECK(buffer->hotlist_max_level_nicks);
+ POINTERS_EQUAL(NULL, buffer->keys);
+ POINTERS_EQUAL(NULL, buffer->last_key);
+ LONGS_EQUAL(0, buffer->keys_count);
+ CHECK(buffer->local_variables);
+ LONGS_EQUAL(2, buffer->local_variables->items_count);
+ STRCMP_EQUAL("core",
+ (const char *)hashtable_get (buffer->local_variables, "plugin"));
+ STRCMP_EQUAL(TEST_BUFFER_NAME,
+ (const char *)hashtable_get (buffer->local_variables, "name"));
+ POINTERS_EQUAL(gui_buffers, buffer->prev_buffer);
+ POINTERS_EQUAL(NULL, buffer->next_buffer);
+ LONGS_EQUAL(2, gui_buffers_count);
+ gui_buffer_close (buffer);
+
+ hashtable_set (properties, "title", "the buffer title");
+ hashtable_set (properties, "short_name", "the_short_name");
+ hashtable_set (properties, "localvar_set_test", "value");
+ hashtable_set (properties, "key_bind_meta-y", "/test_y arg1 arg2");
+ hashtable_set (properties, "key_bind_meta-z", "/test_z arg1 arg2");
+ buffer = gui_buffer_new_props (NULL, TEST_BUFFER_NAME, properties,
+ &test_buffer_input_cb, NULL, NULL,
+ &test_buffer_close_cb, NULL, NULL);
+ STRCMP_EQUAL("the buffer title", buffer->title);
+ STRCMP_EQUAL("the_short_name", buffer->short_name);
+ LONGS_EQUAL(3, buffer->local_variables->items_count);
+ STRCMP_EQUAL("value",
+ (const char *)hashtable_get (buffer->local_variables, "test"));
+ CHECK(buffer->keys);
+ STRCMP_EQUAL("\x01[y", buffer->keys->key);
+ STRCMP_EQUAL("/test_y arg1 arg2", buffer->keys->command);
+ POINTERS_EQUAL(NULL, buffer->keys->prev_key);
+ CHECK(buffer->keys->next_key);
+ STRCMP_EQUAL("\x01[z", buffer->keys->next_key->key);
+ STRCMP_EQUAL("/test_z arg1 arg2", buffer->keys->next_key->command);
+ POINTERS_EQUAL(buffer->keys, buffer->keys->next_key->prev_key);
+ POINTERS_EQUAL(NULL, buffer->keys->next_key->next_key);
+ LONGS_EQUAL(2, buffer->keys_count);
+ gui_buffer_close (buffer);
+
+ hashtable_free (properties);
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_new
+ */
+
+TEST(GuiBuffer, New)
+{
+ struct t_gui_buffer *buffer;
+
+ buffer = gui_buffer_new (NULL, TEST_BUFFER_NAME,
+ &test_buffer_input_cb, NULL, NULL,
+ &test_buffer_close_cb, NULL, NULL);
+ CHECK(buffer);
+ POINTERS_EQUAL(NULL, buffer->plugin);
+ POINTERS_EQUAL(NULL, buffer->plugin_name_for_upgrade);
+ LONGS_EQUAL(2, buffer->number);
+ LONGS_EQUAL(0, buffer->layout_number);
+ LONGS_EQUAL(0, buffer->layout_number_merge_order);
+ STRCMP_EQUAL(TEST_BUFFER_NAME, buffer->name);
+ STRCMP_EQUAL("core." TEST_BUFFER_NAME, buffer->full_name);
+ POINTERS_EQUAL(NULL, buffer->old_full_name);
+ POINTERS_EQUAL(NULL, buffer->short_name);
+ gui_buffer_close (buffer);
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_user_input_cb
+ */
+
+TEST(GuiBuffer, UserInputCb)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_new_user
+ */
+
+TEST(GuiBuffer, NewUser)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_user_set_callbacks
+ */
+
+TEST(GuiBuffer, UserSetCallbacks)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_valid
+ */
+
+TEST(GuiBuffer, Valid)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_string_replace_local_var
+ */
+
+TEST(GuiBuffer, StringReplaceLocalVar)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_match_list
+ */
+
+TEST(GuiBuffer, MatchList)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_plugin_for_upgrade
+ */
+
+TEST(GuiBuffer, SetPluginForUpgrade)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_property_in_list
+ */
+
+TEST(GuiBuffer, PropertyInList)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_get_integer
+ */
+
+TEST(GuiBuffer, GetInteger)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_get_string
+ */
+
+TEST(GuiBuffer, GetString)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_get_pointer
+ */
+
+TEST(GuiBuffer, GetPointer)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_ask_chat_refresh
+ */
+
+TEST(GuiBuffer, AskChatRefresh)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_name
+ */
+
+TEST(GuiBuffer, SetName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_short_name
+ */
+
+TEST(GuiBuffer, SetShortName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_type
+ */
+
+TEST(GuiBuffer, SetType)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_title
+ */
+
+TEST(GuiBuffer, SetTitle)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_time_for_each_line
+ */
+
+TEST(GuiBuffer, SetTimeForEachLine)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_nicklist
+ */
+
+TEST(GuiBuffer, SetNicklist)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_nicklist_case_sensitive
+ */
+
+TEST(GuiBuffer, SetNicklistCaseSensitive)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_nicklist_display_groups
+ */
+
+TEST(GuiBuffer, SetNicklistDisplayGroups)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_highlight_words
+ */
+
+TEST(GuiBuffer, SetHighlightWords)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_highlight_words_list
+ */
+
+TEST(GuiBuffer, SetHighlightWordsList)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_add_highlight_words
+ */
+
+TEST(GuiBuffer, AddHighlightWords)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_remove_highlight_words
+ */
+
+TEST(GuiBuffer, RemoveHighlightWords)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_highlight_regex
+ */
+
+TEST(GuiBuffer, SetHighlightRegex)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_highlight_tags_restrict
+ */
+
+TEST(GuiBuffer, SetHighlightTagsRestrict)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_highlight_tags
+ */
+
+TEST(GuiBuffer, SetHighlightTags)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_hotlist_max_level_nicks
+ */
+
+TEST(GuiBuffer, SetHotlistMaxLevelNicks)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_add_hotlist_max_level_nicks
+ */
+
+TEST(GuiBuffer, AddHotlistMaxLevelNicks)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_remove_hotlist_max_level_nicks
+ */
+
+TEST(GuiBuffer, RemoveHotlistMaxLevelNicks)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_input_get_unknown_commands
+ */
+
+TEST(GuiBuffer, SetInputGetUnknownCommands)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_input_get_empty
+ */
+
+TEST(GuiBuffer, SetInputGetEmpty)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_input_multiline
+ */
+
+TEST(GuiBuffer, SetInputMultiline)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_unread
+ */
+
+TEST(GuiBuffer, SetUnread)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set
+ */
+
+TEST(GuiBuffer, Set)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_pointer
+ */
+
+TEST(GuiBuffer, SetPointer)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_compute_num_displayed
+ */
+
+TEST(GuiBuffer, ComputeNumDisplayed)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_add_value_num_displayed
+ */
+
+TEST(GuiBuffer, AddValueNumDisplayed)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_is_main
+ */
+
+TEST(GuiBuffer, IsMain)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_main
+ */
+
+TEST(GuiBuffer, SearchMain)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_by_full_name
+ */
+
+TEST(GuiBuffer, SearchByFullName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_by_name
+ */
+
+TEST(GuiBuffer, SearchByName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_by_partial_name
+ */
+
+TEST(GuiBuffer, SearchByPartialName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_by_number
+ */
+
+TEST(GuiBuffer, SearchByNumber)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_by_number_or_name
+ */
+
+TEST(GuiBuffer, SearchByNumberOrName)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_by_layout_number
+ */
+
+TEST(GuiBuffer, SearchByLayoutNumber)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_search_range
+ */
+
+TEST(GuiBuffer, SearchRange)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_count_merged_buffers
+ */
+
+TEST(GuiBuffer, CountMergedBuffers)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_is_scrolled
+ */
+
+TEST(GuiBuffer, IsScrolled)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_clear
+ */
+
+TEST(GuiBuffer, Clear)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_clear_all
+ */
+
+TEST(GuiBuffer, ClearAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_close
+ */
+
+TEST(GuiBuffer, Close)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_switch_by_number
+ */
+
+TEST(GuiBuffer, SwitchByNumber)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_set_active_buffer
+ */
+
+TEST(GuiBuffer, SetActiveBuffer)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_get_next_active_buffer
+ */
+
+TEST(GuiBuffer, GetNextActiveBuffer)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_get_previous_active_buffer
+ */
+
+TEST(GuiBuffer, GetPreviousActiveBuffer)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_renumber
+ */
+
+TEST(GuiBuffer, Renumber)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_move_to_number
+ */
+
+TEST(GuiBuffer, MoveToNumber)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_swap
+ */
+
+TEST(GuiBuffer, Swap)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_merge
+ */
+
+TEST(GuiBuffer, Merge)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_unmerge
+ */
+
+TEST(GuiBuffer, Unmerge)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_unmerge_all
+ */
+
+TEST(GuiBuffer, UnmergeAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_hide
+ */
+
+TEST(GuiBuffer, Hide)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_hide_all
+ */
+
+TEST(GuiBuffer, HideAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_unhide
+ */
+
+TEST(GuiBuffer, Unhide)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_unhide_all
+ */
+
+TEST(GuiBuffer, UnhideAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_sort_by_layout_number
+ */
+
+TEST(GuiBuffer, SortByLayoutNumber)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_undo_snap
+ */
+
+TEST(GuiBuffer, UndoSnap)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_undo_snap_free
+ */
+
+TEST(GuiBuffer, UndoSnapFree)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_undo_add
+ */
+
+TEST(GuiBuffer, UndoAdd)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_undo_free
+ */
+
+TEST(GuiBuffer, UndoFree)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_undo_free_all
+ */
+
+TEST(GuiBuffer, UndoFreeAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_search
+ */
+
+TEST(GuiBuffer, VisitedSearch)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_search_by_number
+ */
+
+TEST(GuiBuffer, VisitedSearchByNumber)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_remove
+ */
+
+TEST(GuiBuffer, VisitedRemove)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_remove_by_buffer
+ */
+
+TEST(GuiBuffer, VisitedRemoveByBuffer)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_remove_all
+ */
+
+TEST(GuiBuffer, VisitedRemoveAll)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_add
+ */
+
+TEST(GuiBuffer, VisitedAdd)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_get_index_previous
+ */
+
+TEST(GuiBuffer, VisitedGetIndexPrevious)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_visited_get_index_next
+ */
+
+TEST(GuiBuffer, VisitedGetIndexNext)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_hdata_buffer_cb
+ */
+
+TEST(GuiBuffer, HdataBufferCb)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_hdata_input_undo_cb
+ */
+
+TEST(GuiBuffer, HdataInputUndoCb)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_hdata_buffer_visited_cb
+ */
+
+TEST(GuiBuffer, HdataBufferVisitedCb)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_add_to_infolist
+ */
+
+TEST(GuiBuffer, AddToInfolist)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_dump_hexa
+ */
+
+TEST(GuiBuffer, DumpHexa)
+{
+ /* TODO: write tests */
+}
+
+/*
+ * Tests functions:
+ * gui_buffer_print_log
+ */
+
+TEST(GuiBuffer, PrintLog)
+{
+ /* TODO: write tests */
+}