diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
commit | 0441d265f2bb9da249c7abf333f0f771fadb4ab5 (patch) | |
tree | 3f3789daa2f6db22da6e55e92bee0062a7d613fe /pigeonhole/tests/extensions/enotify/execute.svtest | |
parent | Initial commit. (diff) | |
download | dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.tar.xz dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.zip |
Adding upstream version 1:2.3.21+dfsg1.upstream/1%2.3.21+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pigeonhole/tests/extensions/enotify/execute.svtest')
-rw-r--r-- | pigeonhole/tests/extensions/enotify/execute.svtest | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/enotify/execute.svtest b/pigeonhole/tests/extensions/enotify/execute.svtest new file mode 100644 index 0000000..cd6486d --- /dev/null +++ b/pigeonhole/tests/extensions/enotify/execute.svtest @@ -0,0 +1,99 @@ +require "vnd.dovecot.testsuite"; +require "relational"; + + +/* + * Execution testing (currently just meant to trigger any segfaults) + */ + +test "RFC Example 1" { + if not test_script_compile "execute/draft-rfc-ex1.sieve" { + test_fail "script compile failed"; + } + + if not test_script_run { + test_fail "script run failed"; + } + + if not test_result_execute { + test_fail "result execute failed"; + } +} + +test "RFC Example 2" { + if not test_script_compile "execute/draft-rfc-ex2.sieve" { + test_fail "script compile failed"; + } + + if not test_script_run { + test_fail "script execute failed"; + } + + if not test_result_execute { + test_fail "result execute failed"; + } +} + +/* tel: not supported +test "RFC Example 3" { + if not test_script_compile "execute/draft-rfc-ex3.sieve" { + test_fail "script compile failed"; + } + + if not test_script_run { + test_fail "script execute failed"; + } + + if not test_result_execute { + test_fail "result execute failed"; + } +} +*/ + +/* tel: and xmmp: not supported +test "RFC Example 5" { + if not test_script_compile "execute/draft-rfc-ex5.sieve" { + test_fail "script compile failed"; + } + + if not test_script_run { + test_fail "script execute failed"; + } + + if not test_result_execute { + test_fail "result execute failed"; + } +} +*/ + +test "RFC Example 6" { + if not test_script_compile "execute/draft-rfc-ex6.sieve" { + test_fail "script compile failed"; + } + + if not test_script_run { + test_fail "script execute failed"; + } + + if not test_result_execute { + test_fail "result execute failed"; + } +} + +test "Duplicate recipients" { + if not test_script_compile "execute/duplicates.sieve" { + test_fail "script compile failed"; + } + + if not test_script_run { + test_fail "script execute failed"; + } + + if test_result_action :count "ne" "2" { + test_fail "second notify action was discarded entirely"; + } + + if not test_result_execute { + test_fail "result execute failed"; + } +} |