1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

api: add function string_match_list

This commit is contained in:
Sébastien Helleu
2019-02-26 20:02:07 +01:00
parent e473161c9f
commit c2859096cb
29 changed files with 566 additions and 21 deletions
+5
View File
@@ -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)