diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-27 21:53:18 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-27 23:04:24 +0100 |
commit | 8107b5d162a2e3f96927119e38a63a5c7e3e254f (patch) | |
tree | 533364e99b8fd0bb9b6e021072cbc4ce608f2fd4 /tests/unit/core | |
parent | dd133938965f1443a98671dbcb37e6dfb894a39a (diff) | |
download | weechat-8107b5d162a2e3f96927119e38a63a5c7e3e254f.zip |
tests: add eval tests on options with different types
Diffstat (limited to 'tests/unit/core')
-rw-r--r-- | tests/unit/core/test-core-eval.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp index e5febcd3f..4e0b34ed4 100644 --- a/tests/unit/core/test-core-eval.cpp +++ b/tests/unit/core/test-core-eval.cpp @@ -30,6 +30,7 @@ extern "C" #include "src/core/wee-config.h" #include "src/core/wee-config-file.h" #include "src/core/wee-hashtable.h" +#include "src/core/wee-secure.h" #include "src/core/wee-string.h" #include "src/core/wee-version.h" #include "src/gui/gui-color.h" @@ -485,10 +486,17 @@ TEST(CoreEval, EvalExpression) WEE_CHECK_EVAL("123129", "${calc:${repeat:2,123}+2*3}"); /* test option */ + hashtable_set (secure_hashtable_data, "sec_option", "sec_value"); + WEE_CHECK_EVAL("sec_value", "${sec.data.sec_option}"); + hashtable_remove (secure_hashtable_data, "sec_option"); snprintf (str_value, sizeof (str_value), "%d", CONFIG_INTEGER(config_look_scroll_amount)); WEE_CHECK_EVAL(str_value, "${weechat.look.scroll_amount}"); WEE_CHECK_EVAL(str_value, "${${window.buffer.name}.look.scroll_amount}"); + WEE_CHECK_EVAL("right", "${weechat.look.prefix_align}"); + WEE_CHECK_EVAL("1", "${weechat.startup.display_logo}"); + WEE_CHECK_EVAL("=!=", "${weechat.look.prefix_error}"); + WEE_CHECK_EVAL("lightcyan", "${weechat.color.chat_nick}"); /* test hdata */ WEE_CHECK_EVAL("x", "x${buffer.number"); |