diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-27 00:02:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-27 00:02:48 +0000 |
commit | 3728212eeea755b5a71e38a9e8dbd832ba3b4b19 (patch) | |
tree | 43426a2e847c76b7eec3804a1db53c66ef1a56e6 /test/lua | |
parent | 6607a24cc8b050497cedf5a20c17d9e2950da68b (diff) | |
download | rspamd-3728212eeea755b5a71e38a9e8dbd832ba3b4b19.tar.gz rspamd-3728212eeea755b5a71e38a9e8dbd832ba3b4b19.zip |
More to priorities optimization.
Diffstat (limited to 'test/lua')
-rw-r--r-- | test/lua/unit/expressions.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/lua/unit/expressions.lua b/test/lua/unit/expressions.lua index 7bf3806b9..d6deaefd7 100644 --- a/test/lua/unit/expressions.lua +++ b/test/lua/unit/expressions.lua @@ -25,22 +25,22 @@ context("Rspamd expressions", function() local pool = rspamd_mempool.create() local cases = { - {'A & B | !C', 'A B & C ! |'}, + {'A & B | !C', 'C ! A B & |'}, {'A & (B | !C)', 'A B C ! | &'}, -- Unbalanced braces {'(((A))', nil}, -- Balanced braces {'(((A)))', 'A'}, -- Plus and comparision operators - {'A + B + C + D > 2', 'A B C D + + + 2 >'}, + {'A + B + C + D > 2', '2 A B C D +(4) >'}, -- Plus and logic operators - {'((A + B + C + D) > 2) & D', 'A B C D + + + 2 > D &'}, + {'((A + B + C + D) > 2) & D', 'D 2 A B C D +(4) > &'}, -- Associativity - {'A | B | C & D & E', 'A B C D E & & | |'}, + {'A | B | C & D & E', 'A B C D E &(3) |(3)'}, -- More associativity - {'1 | 0 & 0 | 0', '1 0 0 & 0 | |'}, + {'1 | 0 & 0 | 0', '1 0 0 & 0 |(3)'}, -- Extra space - {'A & B | ! C', 'A B & C ! |'}, + {'A & B | ! C', 'C ! A B & |'}, } for _,c in ipairs(cases) do local expr,err = rspamd_expression.create(c[1], |