diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-12 09:26:10 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-12 09:26:10 +0200 |
commit | e7b2d98b6eb340be6de588be5ce45f80254df35d (patch) | |
tree | 82c26238acf8dd918902503577c1098a4ba9885b /tests/unit | |
parent | e57777acb18e63d77315c0229d2273b97ad81f7e (diff) | |
download | weechat-e7b2d98b6eb340be6de588be5ce45f80254df35d.zip |
core: add buffer property "modes"
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/gui/test-gui-buffer.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/gui/test-gui-buffer.cpp b/tests/unit/gui/test-gui-buffer.cpp index dea97f3a2..3a568ef26 100644 --- a/tests/unit/gui/test-gui-buffer.cpp +++ b/tests/unit/gui/test-gui-buffer.cpp @@ -552,6 +552,7 @@ TEST(GuiBuffer, NewProps) POINTERS_EQUAL(NULL, buffer->close_callback_data); LONGS_EQUAL(0, buffer->closing); POINTERS_EQUAL(NULL, buffer->title); + POINTERS_EQUAL(NULL, buffer->modes); CHECK(buffer->own_lines); POINTERS_EQUAL(NULL, buffer->own_lines->first_line); POINTERS_EQUAL(NULL, buffer->own_lines->last_line); @@ -639,6 +640,7 @@ TEST(GuiBuffer, NewProps) gui_buffer_close (buffer); hashtable_set (properties, "title", "the buffer title"); + hashtable_set (properties, "modes", "+nt"); 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"); @@ -647,6 +649,7 @@ TEST(GuiBuffer, NewProps) &test_buffer_input_cb, NULL, NULL, &test_buffer_close_cb, NULL, NULL); STRCMP_EQUAL("the buffer title", buffer->title); + STRCMP_EQUAL("+nt", buffer->modes); STRCMP_EQUAL("the_short_name", buffer->short_name); LONGS_EQUAL(3, buffer->local_variables->items_count); STRCMP_EQUAL("value", @@ -934,6 +937,7 @@ TEST(GuiBuffer, GetString) STRCMP_EQUAL("weechat", gui_buffer_get_string (gui_buffers, "short_name")); STRCMP_EQUAL("formatted", gui_buffer_get_string (gui_buffers, "type")); STRNCMP_EQUAL("WeeChat ", gui_buffer_get_string (gui_buffers, "title"), 8); + POINTERS_EQUAL(NULL, gui_buffer_get_string (gui_buffers, "modes")); POINTERS_EQUAL(NULL, gui_buffer_get_string (gui_buffers, "input_prompt")); STRCMP_EQUAL("", gui_buffer_get_string (gui_buffers, "input")); POINTERS_EQUAL(NULL, gui_buffer_get_string (gui_buffers, "text_search_input")); @@ -1035,6 +1039,16 @@ TEST(GuiBuffer, SetTitle) /* * Tests functions: + * gui_buffer_set_modes + */ + +TEST(GuiBuffer, SetModes) +{ + /* TODO: write tests */ +} + +/* + * Tests functions: * gui_buffer_set_time_for_each_line */ |