aboutsummaryrefslogtreecommitdiffstats
path: root/test/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-25 18:24:58 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-25 18:24:58 +0000
commitaf98d23a1663023c3fc15658fb28c8cd88ed5b1e (patch)
tree980bc505376532f0d699ef6a91079fb607003dcd /test/lua
parent06d5e6c256a86af708933b2abef80370d50bec3d (diff)
downloadrspamd-af98d23a1663023c3fc15658fb28c8cd88ed5b1e.tar.gz
rspamd-af98d23a1663023c3fc15658fb28c8cd88ed5b1e.zip
Another tricky case of test.
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/unit/expressions.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lua/unit/expressions.lua b/test/lua/unit/expressions.lua
index d75e09ebb..7bf3806b9 100644
--- a/test/lua/unit/expressions.lua
+++ b/test/lua/unit/expressions.lua
@@ -83,6 +83,7 @@ context("Rspamd expressions", function()
{'((A + B + C + D) > 1) & F', 0},
{'(A + B + C + D) > 1 && F || E', 1},
{'(A + B + C + D) > 100 && F || !E', 0},
+ {'F && ((A + B + C + D) > 1)', 0},
{'!!C', 1},
}
for _,c in ipairs(cases) do
@@ -90,7 +91,7 @@ context("Rspamd expressions", function()
{parse_func, process_func}, pool)
assert_not_nil(expr, "Cannot parse " .. c[1])
- --print(expr)
+ --print(expr)
res = expr:process(atoms)
assert_equal(res, c[2], string.format("Processed expr '%s' returned '%d', expected: '%d'",
expr:to_string(), res, c[2]))