diff options
-rw-r--r-- | tests/unit/core/test-core-eval.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp index f1cb40c6b..102c6382e 100644 --- a/tests/unit/core/test-core-eval.cpp +++ b/tests/unit/core/test-core-eval.cpp @@ -34,6 +34,7 @@ extern "C" #include "src/core/wee-string.h" #include "src/core/wee-version.h" #include "src/gui/gui-buffer.h" +#include "src/gui/gui-line.h" #include "src/gui/gui-color.h" #include "src/plugins/plugin.h" } @@ -526,6 +527,20 @@ TEST(CoreEval, EvalExpression) snprintf (str_value, sizeof (str_value), "${buffer[0x%lx].full_name}", (long unsigned int)gui_buffers); WEE_CHECK_EVAL("core.weechat", str_value); + snprintf (str_value, sizeof (str_value), "%c", 1); + WEE_CHECK_EVAL(str_value, + "${window.buffer.own_lines.first_line.data.displayed}"); + WEE_CHECK_EVAL("1", "${window.buffer.num_displayed}"); + snprintf (str_value, sizeof (str_value), + "%lld", + (long long)(gui_buffers->own_lines->first_line->data->date)); + WEE_CHECK_EVAL(str_value, + "${window.buffer.own_lines.first_line.data.date}"); + snprintf (str_value, sizeof (str_value), + "0x%lx", (long unsigned int)(gui_buffers->local_variables)); + 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}"); /* test with another prefix/suffix */ options = hashtable_new (32, |