1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 02:03:13 +02:00

core: allow /eval to get hashtable properties

This commit is contained in:
Andrew Potter
2023-03-10 20:19:03 +01:00
committed by Sébastien Helleu
parent dd65e91a75
commit e3f588679c
3 changed files with 30 additions and 4 deletions
+7
View File
@@ -950,6 +950,13 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL(str_value, "${window.buffer.local_variables}");
WEE_CHECK_EVAL("core", "${window.buffer.local_variables.plugin}");
WEE_CHECK_EVAL("weechat", "${window.buffer.local_variables.name}");
WEE_CHECK_EVAL("name,plugin", "${window.buffer.local_variables.keys_sorted()}");
WEE_CHECK_EVAL("name:weechat,plugin:core", "${window.buffer.local_variables.keys_values_sorted()}");
WEE_CHECK_EVAL("", "${window.buffer.local_variables.nonexisting_func()}");
WEE_CHECK_EVAL("", "${window.buffer.local_variables.nonexisting_func(}");
WEE_CHECK_EVAL("", "${window.buffer.local_variables.nonexisting_func)}");
WEE_CHECK_EVAL("", "${window.buffer.local_variables.keys( )}");
WEE_CHECK_EVAL("", "${window.buffer.local_variables.()}");
hashtable_remove_all (pointers);
/* test with another prefix/suffix */