1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 11:56:38 +02:00

api: add function string_color_code_size (issue #1547)

This commit is contained in:
Sébastien Helleu
2020-08-22 08:55:16 +02:00
parent 7dd5abd625
commit 268aa631c6
27 changed files with 608 additions and 1 deletions
+4
View File
@@ -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)