aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-10 11:37:02 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-10 11:46:43 +0000
commit18836eb4ef19990f9bf2844957b32cbe4a188c0e (patch)
treee31829f10ddadf6e58678f86e261a9caaf692fc3 /test
parentf8d2466d3a36e8418f2d306ebaaed0ef962737b0 (diff)
downloadrspamd-18836eb4ef19990f9bf2844957b32cbe4a188c0e.tar.gz
rspamd-18836eb4ef19990f9bf2844957b32cbe4a188c0e.zip
[Test] Add some more tests
Diffstat (limited to 'test')
-rw-r--r--test/lua/unit/selectors.lua11
1 files changed, 11 insertions, 0 deletions
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@example.com>, <no-one@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_"