diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-03-13 14:03:23 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-03-13 14:03:23 +0100 |
commit | 869279e9b6d6e4e68c02603a64ee1819a5c07601 (patch) | |
tree | 55af426968224d0b3c2af7328ba4f52e1cd60ff2 /tests/unit | |
parent | 947ca33c14c934f5d87aaec1775bc69e44aafd20 (diff) | |
download | weechat-869279e9b6d6e4e68c02603a64ee1819a5c07601.zip |
tests: add tests on function gui_buffer_match_list
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/gui/test-gui-buffer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/unit/gui/test-gui-buffer.cpp b/tests/unit/gui/test-gui-buffer.cpp index 401bfa1f5..0a040fdbb 100644 --- a/tests/unit/gui/test-gui-buffer.cpp +++ b/tests/unit/gui/test-gui-buffer.cpp @@ -504,7 +504,19 @@ TEST(GuiBuffer, StringReplaceLocalVar) TEST(GuiBuffer, MatchList) { - /* TODO: write tests */ + LONGS_EQUAL(0, gui_buffer_match_list (NULL, NULL)); + LONGS_EQUAL(0, gui_buffer_match_list (gui_buffers, NULL)); + LONGS_EQUAL(0, gui_buffer_match_list (gui_buffers, "")); + LONGS_EQUAL(0, gui_buffer_match_list (NULL, "*")); + + LONGS_EQUAL(1, gui_buffer_match_list (gui_buffers, "*")); + LONGS_EQUAL(1, gui_buffer_match_list (gui_buffers, "core.*")); + LONGS_EQUAL(1, gui_buffer_match_list (gui_buffers, "*.wee*")); + LONGS_EQUAL(1, gui_buffer_match_list (gui_buffers, "*,!*test*")); + LONGS_EQUAL(1, gui_buffer_match_list (gui_buffers, "*,!*test*,!*abc*")); + + LONGS_EQUAL(0, gui_buffer_match_list (gui_buffers, "*,!*wee*")); + LONGS_EQUAL(0, gui_buffer_match_list (gui_buffers, "*,!*abc*,!*wee*")); } /* |