dovecot-2.1-pigeonhole: lib-sieve: editheader extension: added u...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Thu Nov 24 01:50:17 EET 2011
details: http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/6757a772b086
changeset: 1550:6757a772b086
user: Stephan Bosch <stephan at rename-it.nl>
date: Thu Nov 24 00:50:11 2011 +0100
description:
lib-sieve: editheader extension: added utf8-decoding-related testsuite item.
diffstat:
tests/extensions/editheader/utf8.svtest | 48 ++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
diffs (55 lines):
diff -r 253a0672ad92 -r 6757a772b086 tests/extensions/editheader/utf8.svtest
--- a/tests/extensions/editheader/utf8.svtest Thu Nov 24 00:24:47 2011 +0100
+++ b/tests/extensions/editheader/utf8.svtest Thu Nov 24 00:50:11 2011 +0100
@@ -47,3 +47,51 @@
}
}
+test_result_reset;
+
+test_set "message" text:
+Subject: Frop!
+Comment: Ein =?utf-8?q?unerh=C3=B6rt_gro=C3=9Fer?= Test
+X-Spam: no
+From: stephan at example.com
+To: stephan at example.com
+
+Frop!
+.
+;
+
+test "UTF8 - existing; delete other; get" {
+ set "comment" "Ein unerh${unicode:00F6}rt gro${unicode:00DF}er Test";
+
+ deleteheader "x-spam";
+
+ if not exists "comment" {
+ test_fail "header not present";
+ }
+
+ if not header :is "comment" "${comment}" {
+ test_fail "wrong content retrieved";
+ }
+
+ redirect "frop at example.com";
+
+ if not test_result_execute {
+ test_fail "failed to execute result";
+ }
+
+ /* redirected message */
+
+ if not test_message :smtp 0 {
+ test_fail "message not redirected";
+ }
+
+ if not exists "comment" {
+ test_fail "header not present in redirected mail";
+ }
+
+ if not header :is "comment" "${comment}" {
+ test_fail "wrong content retrieved from redirected mail";
+ }
+}
+
+
More information about the dovecot-cvs
mailing list