diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-27 22:15:22 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-27 23:04:24 +0100 |
commit | 0975c407e0db04ee704cbcfc5ac7925f475f26d8 (patch) | |
tree | e1fe15dfb4c966744f02df3fa863b0174cedb155 /tests/unit/core/test-core-eval.cpp | |
parent | 201b4da1690d5c856625c1c48f5202a82f26644c (diff) | |
download | weechat-0975c407e0db04ee704cbcfc5ac7925f475f26d8.zip |
tests: add eval tests with hdata list name and pointer
Diffstat (limited to 'tests/unit/core/test-core-eval.cpp')
-rw-r--r-- | tests/unit/core/test-core-eval.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp index 7df3baddb..d7bd83b96 100644 --- a/tests/unit/core/test-core-eval.cpp +++ b/tests/unit/core/test-core-eval.cpp @@ -33,6 +33,7 @@ extern "C" #include "src/core/wee-secure.h" #include "src/core/wee-string.h" #include "src/core/wee-version.h" +#include "src/gui/gui-buffer.h" #include "src/gui/gui-color.h" #include "src/plugins/plugin.h" } @@ -510,6 +511,11 @@ TEST(CoreEval, EvalExpression) WEE_CHECK_EVAL("1", "${window.buffer.number}"); WEE_CHECK_EVAL("core.weechat", "${buffer.full_name}"); WEE_CHECK_EVAL("core.weechat", "${window.buffer.full_name}"); + WEE_CHECK_EVAL("", "${buffer[0x0].full_name}"); + WEE_CHECK_EVAL("core.weechat", "${buffer[gui_buffers].full_name}"); + snprintf (str_value, sizeof (str_value), + "${buffer[0x%lx].full_name}", (long unsigned int)gui_buffers); + WEE_CHECK_EVAL("core.weechat", str_value); /* test with another prefix/suffix */ options = hashtable_new (32, |