dovecot-2.0-pigeonhole: Vacation extension: added test for prope...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Sun Feb 20 17:42:24 EET 2011


details:   http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/dd89949aa055
changeset: 1480:dd89949aa055
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sun Feb 20 16:42:17 2011 +0100
description:
Vacation extension: added test for proper From: address when replying for Cc'd e-mail.

diffstat:

 tests/extensions/vacation/smtp.svtest |  35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diffs (49 lines):

diff -r b4f57b02d2ed -r dd89949aa055 tests/extensions/vacation/smtp.svtest
--- a/tests/extensions/vacation/smtp.svtest	Sat Feb 19 08:45:13 2011 +0100
+++ b/tests/extensions/vacation/smtp.svtest	Sun Feb 20 16:42:17 2011 +0100
@@ -1,6 +1,7 @@
 require "vnd.dovecot.testsuite";
 require "envelope";
 require "vacation";
+require "variables";
 
 test_set "message" text:
 From: stephan at example.org
@@ -120,3 +121,37 @@
 		test_fail "envelope sender not null";
 	}
 }
+
+test_result_reset;
+
+test_set "message" text:
+From: stephan at example.org
+To: tss at example.net
+Cc: colleague at example.net
+Subject: Frop!
+
+Frop!
+.
+;
+
+test_set "envelope.from" "sirius at example.org";
+test_set "envelope.to" "colleague at example.net";
+
+test "Cc" {
+	vacation "I am gone";
+
+	if not test_result_execute {
+		test_fail "failed to execute vacation";
+	}
+
+	test_message :smtp 0;
+
+	if not address :is "from" "colleague at example.net" {
+		if address :matches "from" "*" { }
+		test_fail "from address incorrect: ${1}";
+	}
+
+	if not envelope :is "from" "" {
+		test_fail "envelope sender not null";
+	}
+}


More information about the dovecot-cvs mailing list