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

core: allow floating point and hexadecimal numbers in comparison of evaluated values

This commit is contained in:
Sébastien Helleu
2017-10-17 20:43:40 +02:00
parent 5233160d82
commit 1d56e17b2f
28 changed files with 714 additions and 627 deletions
+3
View File
@@ -69,6 +69,9 @@ def test_strings():
check(weechat.string_input_for_buffer('/test') == '')
check(weechat.string_input_for_buffer('//test') == '/test')
check(weechat.string_eval_expression("100 > 50", {}, {}, {"type": "condition"}) == '1')
check(weechat.string_eval_expression("-50 < 100", {}, {}, {"type": "condition"}) == '1')
check(weechat.string_eval_expression("18.2 > 5", {}, {}, {"type": "condition"}) == '1')
check(weechat.string_eval_expression("0xA3 > 2", {}, {}, {"type": "condition"}) == '1')
check(weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) == 'core.weechat')