#include "zbxmockassert.h"
zbx_uint64_t mock_eval_read_rules(const char *path)
zbx_mock_handle_t hrules, hflag;
hrules = zbx_mock_get_parameter_handle(path);
while (ZBX_MOCK_END_OF_VECTOR != (err = (zbx_mock_vector_element(hrules, &hflag))))
if (ZBX_MOCK_SUCCESS != err || ZBX_MOCK_SUCCESS != (err = zbx_mock_string(hflag, &flag)))
fail_msg("Cannot read flag #%d: %s", rules_num, zbx_mock_error_string(err));
if (0 == strcmp(flag, "ZBX_EVAL_PARSE_FUNCTIONID"))
rules |= ZBX_EVAL_PARSE_FUNCTIONID;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_FUNCTION"))
rules |= ZBX_EVAL_PARSE_FUNCTION;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_ITEM_QUERY"))
rules |= ZBX_EVAL_PARSE_ITEM_QUERY;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_MACRO"))
rules |= ZBX_EVAL_PARSE_MACRO;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_USERMACRO"))
rules |= ZBX_EVAL_PARSE_USERMACRO;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_LLDMACRO"))
rules |= ZBX_EVAL_PARSE_LLDMACRO;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_CONST_INDEX"))
rules |= ZBX_EVAL_PARSE_CONST_INDEX;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_MATH"))
rules |= ZBX_EVAL_PARSE_MATH;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_COMPARE_EQ"))
rules |= ZBX_EVAL_PARSE_COMPARE_EQ;
else if (0 == strcmp(flag, "ZBX_EVAL_PARSE_LOGIC"))