diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-08-22 08:55:16 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-08-22 08:55:16 +0200 |
commit | 268aa631c6b464c0d97dce5dbe76f145a6cc5f68 (patch) | |
tree | 00ef2b36db0fc64e2723442f1750934aec030901 /tests/scripts/python | |
parent | 7dd5abd6252d108858f31a717a127f86d5c206c1 (diff) | |
download | weechat-268aa631c6b464c0d97dce5dbe76f145a6cc5f68.zip |
api: add function string_color_code_size (issue #1547)
Diffstat (limited to 'tests/scripts/python')
-rw-r--r-- | tests/scripts/python/testapi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py index 2fbf8370d..aaa03157a 100644 --- a/tests/scripts/python/testapi.py +++ b/tests/scripts/python/testapi.py @@ -71,6 +71,10 @@ def test_strings(): check(weechat.string_format_size(1) == '1 byte') check(weechat.string_format_size(2097152) == '2.10 MB') check(weechat.string_format_size(420000000) == '420.00 MB') + check(weechat.string_color_code_size('') == 0) + check(weechat.string_color_code_size('test') == 0) + str_color = weechat.color('yellow,red') + check(weechat.string_color_code_size(str_color) == 7) check(weechat.string_remove_color('test', '?') == 'test') check(weechat.string_is_command_char('/test') == 1) check(weechat.string_is_command_char('test') == 0) |