Debian Codegraph @

test/functional/configs/regexp.conf

raw
1 .include(duplicate=append,priority=0) "{= env.TESTDIR =}/configs/plugins.conf"
2
3 regexp {
4 SA_BODY_WORD_BOUNDARY_ON_NEWLINE {
5 re = '/\bhello\s/{sa_body}',
6 score = 0.0,
7 description = 'Test if word boundary works correctly on sa_body regexes',
8 group = 'body',
9 }
10 SA_BODY_WORD {
11 re = '/hello/{sa_body}',
12 score = 0.0,
13 description = 'Test if regex works at all in sa_body',
14 group = 'body',
15 }
16 SA_BODY_WORD_WITH_NEWLINE {
17 re = '/helloworld/{sa_body}',
18 score = 0.0,
19 description = 'Test if regex matches word separated with newline (should not work!)',
20 group = 'body',
21 }
22 SA_BODY_WORD_WITH_SPACE {
23 re = '/hello world/{sa_body}',
24 score = 0.0,
25 description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
26 group = 'body',
27 }
28 SA_BODY_WORD_WITH_SPACE_BOUNDARIES {
29 re = '/\bhello world\b/{sa_body}',
30 score = 0.0,
31 description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
32 group = 'body',
33 }
34 SA_BODY_WORD_WITH_SPACE_BOUNDARIES_2 {
35 re = '/\shello\sworld\s/{sa_body}',
36 score = 0.0,
37 description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
38 group = 'body',
39 }
40 SA_BODY_WORD_WITH_SPACE_BOUNDARIES_3 {
41 re = '/\shello\sworld\sthis\s/{sa_body}',
42 score = 0.0,
43 description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
44 group = 'body',
45 }
46 SA_BODY_WORD_WITH_SPACE_AND_DOT {
47 re = '/\bword\.\sagain\b/{sa_body}',
48 score = 0.0,
49 description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
50 group = 'body',
51 }
52 }
53
54 options {
55 dynamic_conf = "{= env.TESTDIR =}/configs/dynamic.conf";
56 }
57 dmarc { }
58 spf { }
59 dkim { }
60 modules {
61 path = "{= env.TESTDIR =}/../../src/plugins/lua/"
62 }
63
64 lua = "{= env.TESTDIR =}/lua/regex_test.lua"