summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-09-18 11:05:33 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-09-18 11:05:33 +0100
commitb1543ef5c40c43680445cd987c15a72ae8598d9a (patch)
tree259dc657287fefe37e027059282e9f2259ffcfbf /test
parent247bc030c0430431153db306af90a70994f08c79 (diff)
downloadrspamd-b1543ef5c40c43680445cd987c15a72ae8598d9a.tar.gz
rspamd-b1543ef5c40c43680445cd987c15a72ae8598d9a.zip
[Test] Forgotten config
Diffstat (limited to 'test')
-rw-r--r--test/functional/configs/regexp.conf46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/functional/configs/regexp.conf b/test/functional/configs/regexp.conf
new file mode 100644
index 000000000..0c0f93573
--- /dev/null
+++ b/test/functional/configs/regexp.conf
@@ -0,0 +1,46 @@
+regexp {
+ SA_BODY_WORD_BOUNDARY_ON_NEWLINE {
+ re = '/\\bhello\\s/{sa_body}',
+ score = 0.0,
+ description = 'Test if word boundary works correctly on sa_body regexes',
+ group = 'body',
+ }
+ SA_BODY_WORD {
+ re = '/hello/{sa_body}',
+ score = 0.0,
+ description = 'Test if regex works at all in sa_body',
+ group = 'body',
+ }
+ SA_BODY_WORD_WITH_NEWLINE {
+ re = '/helloworld/{sa_body}',
+ score = 0.0,
+ description = 'Test if regex matches word separated with newline (should not work!)',
+ group = 'body',
+ }
+ SA_BODY_WORD_WITH_SPACE {
+ re = '/hello world/{sa_body}',
+ score = 0.0,
+ description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
+ group = 'body',
+ }
+ SA_BODY_WORD_WITH_SPACE_BOUNDARIES {
+ re = '/\\bhello world\\b/{sa_body}',
+ score = 0.0,
+ description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
+ group = 'body',
+ }
+ SA_BODY_WORD_WITH_SPACE_BOUNDARIES_2 {
+ re = '/\\shello\\sworld\\s/{sa_body}',
+ score = 0.0,
+ description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
+ group = 'body',
+ }
+ SA_BODY_WORD_WITH_SPACE_BOUNDARIES_3 {
+ re = '/\\shello\\sworld\\sthis\\s/{sa_body}',
+ score = 0.0,
+ description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
+ group = 'body',
+ }
+}
+
+lua = "${TESTDIR}/lua/regex_test.lua"