mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
tests: add tests on functions gui_buffer_new and gui_buffer_new_props
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 | Тестови: линије.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user