Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndris Zeila <andris.zeila@zabbix.com>2021-04-20 18:32:44 +0300
committerAndris Zeila <andris.zeila@zabbix.com>2021-04-20 18:33:10 +0300
commita2a50fe5c81424bc8994fd001e9a0747af3503a6 (patch)
treedc8a1f09e8d1d4cdbc2c4d7999d8cc3f8098d28e /tests
parentadb665df60078701fde6a02648251654ce78b5f6 (diff)
........S. [ZBXNEXT-6452] fixed logic token parsing rules
Diffstat (limited to 'tests')
-rw-r--r--tests/libs/zbxeval/zbx_eval_parse_expression.yaml11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/libs/zbxeval/zbx_eval_parse_expression.yaml b/tests/libs/zbxeval/zbx_eval_parse_expression.yaml
index 87fb3e59d80..bedecd798e8 100644
--- a/tests/libs/zbxeval/zbx_eval_parse_expression.yaml
+++ b/tests/libs/zbxeval/zbx_eval_parse_expression.yaml
@@ -994,9 +994,16 @@ out:
- {type: ZBX_EVAL_TOKEN_OP_EQ, token: '=', opt: 0}
result: SUCCEED
--- # logical not
+test case: Fail 'not 1'
+in:
+ rules: [ZBX_EVAL_PARSE_VAR]
+ expression: 'not 1'
+out:
+ result: FAIL
+---
test case: Succeed 'not 1'
in:
- rules: [ZBX_EVAL_PARSE_MATH,ZBX_EVAL_PARSE_VAR,ZBX_EVAL_PARSE_GROUP,ZBX_EVAL_PARSE_COMPARE]
+ rules: [ZBX_EVAL_PARSE_VAR,ZBX_EVAL_PARSE_LOGIC]
expression: 'not 1'
out:
stack:
@@ -1099,7 +1106,7 @@ out:
--- # logical and/or
test case: Succeed '1=2 or 3<4'
in:
- rules: [ZBX_EVAL_PARSE_VAR,ZBX_EVAL_PARSE_GROUP,ZBX_EVAL_PARSE_MATH,ZBX_EVAL_PARSE_COMPARE]
+ rules: [ZBX_EVAL_PARSE_VAR,ZBX_EVAL_PARSE_GROUP,ZBX_EVAL_PARSE_MATH,ZBX_EVAL_PARSE_COMPARE,ZBX_EVAL_PARSE_LOGIC]
expression: '1=2 or 3<4'
out:
stack: