summaryrefslogtreecommitdiffstats
path: root/test/functional/lua/regex_test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/regex_test.lua')
-rw-r--r--test/functional/lua/regex_test.lua12
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 0000000..01f0e22
--- /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
+})