aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-14 12:43:19 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-14 12:43:19 +0100
commitba22ea79c6eaffa684c7122162612c0429f756a5 (patch)
tree2a919f90ddb3042f430a914054f633790a1ed3e4 /test
parentfe590fd7b5ea560fd468d57296c4bcf25e6cf320 (diff)
downloadrspamd-ba22ea79c6eaffa684c7122162612c0429f756a5.tar.gz
rspamd-ba22ea79c6eaffa684c7122162612c0429f756a5.zip
[Test] Add some missing tests for selectors
Diffstat (limited to 'test')
-rw-r--r--test/lua/unit/selectors.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lua/unit/selectors.lua b/test/lua/unit/selectors.lua
index 294e98b62..dea80fdbf 100644
--- a/test/lua/unit/selectors.lua
+++ b/test/lua/unit/selectors.lua
@@ -342,6 +342,14 @@ context("Selectors test", function()
selector = "header(X-Test, full).last",
expect = {"3"}
},
+ ["header lower digest substring"] = {
+ selector = "header('Subject').lower.digest('hex').substring(1, 16)",
+ expect = {"736ad5f50fc95d73"}
+ },
+ ["header gsub"] = {
+ selector = "header('Subject'):gsub('a', 'b')",
+ expect = {"Second, lower-cbsed hebder subject"}
+ },
}
for case_name, case in pairs(cases) do