1
require "vnd.dovecot.testsuite";
3
require "comparator-i;ascii-numeric";
5
test_set "message" text:
7
From: stephan@rename-it.nl
14
test_mailbox :create "INBOX.VB";
15
test_mailbox :create "INBOX.backup";
18
if not test_script_compile "actions/fileinto.sieve" {
19
test_fail "script compile failed";
22
if not test_script_run {
23
test_fail "script run failed";
26
if not test_result :count "eq" :comparator "i;ascii-numeric" "3" {
27
test_fail "wrong number of actions in result";
30
if not test_result :index 1 "store" {
31
test_fail "first action is not 'store'";
34
if not test_result :index 2 "store" {
35
test_fail "second action is not 'store'";
38
if not test_result :index 3 "keep" {
39
test_fail "third action is not 'keep'";
42
if not test_result_execute {
43
test_fail "result execute failed";
48
if not test_script_compile "actions/redirect.sieve" {
49
test_fail "compile failed";
52
if not test_script_run {
53
test_fail "execute failed";
56
if not test_result :count "eq" :comparator "i;ascii-numeric" "4" {
57
test_fail "wrong number of actions in result";
60
if not test_result :index 1 "redirect" {
61
test_fail "first action is not 'redirect'";
64
if not test_result :index 2 "keep" {
65
test_fail "second action is not 'keep'";
68
if not test_result :index 3 "redirect" {
69
test_fail "third action is not 'redirect'";
72
if not test_result :index 4 "redirect" {
73
test_fail "fourth action is not 'redirect'";
76
if not test_result_execute {
77
test_fail "result execute failed";