From: Vsevolod Stakhov Date: Wed, 25 Mar 2015 18:24:58 +0000 (+0000) Subject: Another tricky case of test. X-Git-Tag: 0.9.0~423 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=af98d23a1663023c3fc15658fb28c8cd88ed5b1e;p=rspamd.git Another tricky case of test. --- 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]))