diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-18 10:41:21 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-18 10:41:21 +0100 |
commit | 247bc030c0430431153db306af90a70994f08c79 (patch) | |
tree | b4b085ddf89354640f6e8304a3788524dbb5b250 /test/functional/lua/regex_test.lua | |
parent | 2d6d215df32c129b15502efdf5ec3c21c3d167ff (diff) | |
download | rspamd-247bc030c0430431153db306af90a70994f08c79.tar.gz rspamd-247bc030c0430431153db306af90a70994f08c79.zip |
[Test] Test for regexps in {sa_body} and urls with newlines
Diffstat (limited to 'test/functional/lua/regex_test.lua')
-rw-r--r-- | test/functional/lua/regex_test.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/lua/regex_test.lua b/test/functional/lua/regex_test.lua new file mode 100644 index 000000000..01f0e226a --- /dev/null +++ b/test/functional/lua/regex_test.lua @@ -0,0 +1,12 @@ +local function get_urls(task) + local urls = task:get_urls() + for _, u in ipairs(urls) do + task:insert_result('FOUND_URL', 1.0, tostring(u)) + end +end + +rspamd_config:register_symbol({ + name = 'SIMPLE', + score = 1.0, + callback = get_urls +}) |