diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
commit | 133a45c109da5310add55824db21af5239951f93 (patch) | |
tree | ba6ac4c0a950a0dda56451944315d66409923918 /test/functional/cases/260_regex.robot | |
parent | Initial commit. (diff) | |
download | rspamd-133a45c109da5310add55824db21af5239951f93.tar.xz rspamd-133a45c109da5310add55824db21af5239951f93.zip |
Adding upstream version 3.8.1.upstream/3.8.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/functional/cases/260_regex.robot')
-rw-r--r-- | test/functional/cases/260_regex.robot | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/functional/cases/260_regex.robot b/test/functional/cases/260_regex.robot new file mode 100644 index 0000000..d5055b0 --- /dev/null +++ b/test/functional/cases/260_regex.robot @@ -0,0 +1,33 @@ +*** Settings *** +Test Setup Rspamd Setup +Test Teardown Rspamd Teardown +Library ${RSPAMD_TESTDIR}/lib/rspamd.py +Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot +Variables ${RSPAMD_TESTDIR}/lib/vars.py + +*** Variables *** +${CONFIG} ${RSPAMD_TESTDIR}/configs/regexp.conf +${MESSAGE} ${RSPAMD_TESTDIR}/messages/newlines.eml +${RSPAMD_SCOPE} Test +${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat +${UTF_MESSAGE} ${RSPAMD_TESTDIR}/messages/utf.eml + + +*** Test Cases *** +Newlines + Scan File ${MESSAGE} + Expect Symbol SA_BODY_WORD + Expect Symbol SA_BODY_WORD_WITH_SPACE + Do Not Expect Symbol SA_BODY_WORD_WITH_NEWLINE + Expect Symbol SA_BODY_WORD_WITH_SPACE_BOUNDARIES + Expect Symbol SA_BODY_WORD_WITH_SPACE_BOUNDARIES_2 + Expect Symbol SA_BODY_WORD_WITH_SPACE_BOUNDARIES_3 + Expect Symbol SA_BODY_WORD_WITH_SPACE_AND_DOT + Expect Symbol With Option FOUND_URL https://google.com/maps/ + Expect Symbol With Option FOUND_URL https://www.google.com/search?q\=hello world&oq\=hello world&aqs\=chrome..69i57j0l5.3045j0j7&sourceid\=chrome&ie\=UTF-8 + Expect Symbol With Option FOUND_URL https://github.com/google/sanitizers/wiki/AddressSanitizer + +Dynamic Config + Scan File ${MESSAGE} + Expect Symbol With Score SA_BODY_WORD 10 + Expect Required Score 20 |