summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Potter <agpotter@gmail.com>2023-03-10 20:19:03 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-03-10 20:19:03 +0100
commite3f588679ce7b3f911502bef1685e65b12ad212e (patch)
tree876fbcfbd32a83f9a15eb2458808597d2033539b /tests
parentdd65e91a753de52bb50804ec18c94627d5f3ff90 (diff)
downloadweechat-e3f588679ce7b3f911502bef1685e65b12ad212e.zip
core: allow /eval to get hashtable properties
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/test-core-eval.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp
index ec045bb77..ab6925fd3 100644
--- a/tests/unit/core/test-core-eval.cpp
+++ b/tests/unit/core/test-core-eval.cpp
@@ -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 */