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

core: display more verbose debug with two "-d" in command /eval

Now a single -d in command /eval shows less debug messages than previous
versions.

To get the same debug messages than previous versions, two -d must be used.
This commit is contained in:
Sébastien Helleu
2020-12-31 20:37:43 +01:00
parent 33c7b96146
commit 2ad3da03a2
28 changed files with 287 additions and 220 deletions
+16 -1
View File
@@ -278,10 +278,25 @@ TEST(CoreEval, EvalCondition)
hashtable_remove (options, "prefix");
hashtable_remove (options, "suffix");
/* test with debug */
/* test with debug level 1 */
hashtable_set (options, "debug", "1");
WEE_CHECK_EVAL("1", "abc < def");
ptr_debug_output = (const char *)hashtable_get (options, "debug_output");
STRCMP_EQUAL("eval_expression(\"abc < def\")\n"
"eval_expression_condition(\"abc < def\")\n"
"eval_expression_condition(\"abc\")\n"
"eval_replace_vars(\"abc\")\n"
"eval_expression_condition(\"def\")\n"
"eval_replace_vars(\"def\")\n"
"eval_compare(\"abc\", \"<\", \"def\")",
ptr_debug_output);
hashtable_remove (options, "debug");
hashtable_remove (options, "debug_output");
/* test with debug level 2 */
hashtable_set (options, "debug", "2");
WEE_CHECK_EVAL("1", "abc < def");
ptr_debug_output = (const char *)hashtable_get (options, "debug_output");
STRCMP_EQUAL("eval_expression(\"abc < def\")\n"
"eval_expression_condition(\"abc < def\")\n"
"eval_strstr_level(\"abc < def\", \"||\", \"(\", \")\", 0)\n"