commit 18836eb: [Test] Add some more tests
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Feb 10 11:49:07 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-02-10 11:37:02 +0000
URL: https://github.com/rspamd/rspamd/commit/18836eb4ef19990f9bf2844957b32cbe4a188c0e (HEAD -> master)
[Test] Add some more tests
---
test/lua/unit/selectors.lua | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/test/lua/unit/selectors.lua b/test/lua/unit/selectors.lua
index 0aa0bab47..ec71927e0 100644
--- a/test/lua/unit/selectors.lua
+++ b/test/lua/unit/selectors.lua
@@ -305,6 +305,14 @@ context("Selectors test", function()
selector = "words('full'):2",
expect = {{'hello', 'world', '', 'mail', 'me'}}
},
+ ["header X-Test first"] = {
+ selector = "header(X-Test, full).first",
+ expect = {"1"}
+ },
+ ["header X-Test last"] = {
+ selector = "header(X-Test, full).last",
+ expect = {"3"}
+ },
}
for case_name, case in pairs(cases) do
@@ -332,6 +340,9 @@ To: <nobody at example.com>, <no-one at example.com>
Date: Wed, 19 Sep 2018 14:36:51 +0100 (BST)
subject: Second, lower-cased header subject
Subject: Test subject
+X-Test: 1
+X-Test: 2
+X-Test: 3
Content-Type: multipart/alternative;
boundary="_000_6be055295eab48a5af7ad4022f33e2d0_"
More information about the Commits
mailing list