summaryrefslogtreecommitdiff
path: root/tests/scripts/python/testapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/python/testapi.py')
-rw-r--r--tests/scripts/python/testapi.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/scripts/python/testapi.py b/tests/scripts/python/testapi.py
index 75a119b8d..6d3833a1a 100644
--- a/tests/scripts/python/testapi.py
+++ b/tests/scripts/python/testapi.py
@@ -72,6 +72,16 @@ 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_parse_size('') == 0)
+ check(weechat.string_parse_size('*') == 0)
+ check(weechat.string_parse_size('z') == 0)
+ check(weechat.string_parse_size('1ba') == 0)
+ check(weechat.string_parse_size('1') == 1)
+ check(weechat.string_parse_size('12b') == 12)
+ check(weechat.string_parse_size('123 b') == 123)
+ check(weechat.string_parse_size('1.34k') == 1340)
+ check(weechat.string_parse_size('1.5m') == 1500000)
+ check(weechat.string_parse_size('2.1g') == 2100000000)
check(weechat.string_color_code_size('') == 0)
check(weechat.string_color_code_size('test') == 0)
str_color = weechat.color('yellow,red')