diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-02-26 20:02:07 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-02-27 07:46:22 +0100 |
commit | c2859096cbf2030f977c9838af99bf13c8584625 (patch) | |
tree | 8d505344feee0e3e0f4af5ac8978a7527f541983 /tests/scripts | |
parent | e473161c9fc3323a86d1cbf61705dcd24233de2a (diff) | |
download | weechat-c2859096cbf2030f977c9838af99bf13c8584625.zip |
api: add function string_match_list
Diffstat (limited to 'tests/scripts')
-rw-r--r-- | tests/scripts/python/testapi.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py index 26ff6f27c..5a4c19190 100644 --- a/tests/scripts/python/testapi.py +++ b/tests/scripts/python/testapi.py @@ -58,6 +58,11 @@ def test_strings(): check(weechat.ngettext('file', 'files', 2) == 'files') check(weechat.strlen_screen('abcd') == 4) check(weechat.string_match('abcdef', 'abc*', 0) == 1) + check(weechat.string_match('abcdef', 'abc*', 1) == 1) + check(weechat.string_match('ABCDEF', 'abc*', 1) == 0) + check(weechat.string_match_list('abcdef', '*,!abc*', 0) == 0) + check(weechat.string_match_list('ABCDEF', '*,!abc*', 1) == 1) + check(weechat.string_match_list('def', '*,!abc*', 0) == 1) check(weechat.string_eval_path_home('test ${abc}', {}, {'abc': '123'}, {}) == 'test 123') check(weechat.string_mask_to_regex('test*mask') == 'test.*mask') check(weechat.string_has_highlight('my test string', 'test,word2') == 1) |