]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Actually the functional test 2522/head
authorMikhail Galanin <mgalanin@mimecast.com>
Mon, 24 Sep 2018 12:24:27 +0000 (13:24 +0100)
committerMikhail Galanin <mgalanin@mimecast.com>
Mon, 24 Sep 2018 12:24:27 +0000 (13:24 +0100)
test/functional/cases/270_selector.robot [new file with mode: 0644]

diff --git a/test/functional/cases/270_selector.robot b/test/functional/cases/270_selector.robot
new file mode 100644 (file)
index 0000000..4223429
--- /dev/null
@@ -0,0 +1,30 @@
+*** Settings ***
+Test Setup      Regex Setup
+Test Teardown   Regex Teardown
+Library         ${TESTDIR}/lib/rspamd.py
+Resource        ${TESTDIR}/lib/rspamd.robot
+Variables       ${TESTDIR}/lib/vars.py
+
+*** Variables ***
+${CONFIG}       ${TESTDIR}/configs/plugins.conf
+${MESSAGE}      ${TESTDIR}/messages/subject1.eml
+${UTF_MESSAGE}  ${TESTDIR}/messages/utf.eml
+${URL_TLD}      ${TESTDIR}/../lua/unit/test_tld.dat
+${RSPAMD_SCOPE}  Test
+
+
+*** Test Cases ***
+Newlines 
+  ${result} =  Scan Message With Rspamc  ${MESSAGE}  --user  test@user.com
+  Check Rspamc  ${result}  CONFIG_SELECTOR_RE_RCPT_SUBJECT
+  Check Rspamc  ${result}  LUA_SELECTOR_RE
+
+
+*** Keywords ***
+Regex Setup
+  ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/selector.conf
+  Set Suite Variable  ${PLUGIN_CONFIG}
+  Generic Setup  PLUGIN_CONFIG
+
+Regex Teardown
+  Normal Teardown