1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
require "vnd.dovecot.testsuite";
/*
* Execution testing (currently just meant to trigger any segfaults)
*/
test_set "message" text:
From: Whomever <whoever@example.com>
To: Someone <someone@example.com>
Date: Sat, 10 Oct 2009 00:30:04 +0200
Subject: whatever
Content-Type: multipart/mixed; boundary=outer
This is a multi-part message in MIME format.
--outer
Content-Type: multipart/alternative; boundary=inner
This is a nested multi-part message in MIME format.
--inner
Content-Type: text/plain; charset="us-ascii"
Hello
--inner
Content-Type: text/html; charset="us-ascii"
<html><body>Hello</body></html>
--inner--
This is the end of the inner MIME multipart.
--outer
Content-Type: message/rfc822
From: Someone Else
Subject: Hello, this is an elaborate request for you to finally say hello
already!
Please say Hello
--outer--
This is the end of the outer MIME multipart.
.
;
test "Basic - foreverypart" {
if not test_script_compile "execute/foreverypart.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_binary_save "ihave-basic";
test_binary_load "ihave-basic";
}
test "Basic - mime" {
if not test_script_compile "execute/mime.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_binary_save "ihave-basic";
test_binary_load "ihave-basic";
}
|