dovecot-1.2-sieve: Testsuite: added test for fileinto with non-e...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Jul 8 01:43:15 EEST 2010


details:   http://hg.rename-it.nl/dovecot-1.2-sieve/rev/a8ca165ee741
changeset: 1260:a8ca165ee741
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu Jul 08 00:43:03 2010 +0200
description:
Testsuite: added test for fileinto with non-existent mailbox.

diffstat:

 tests/execute/errors.svtest         |  28 ++++++++++++++++++++++++++++
 tests/execute/errors/fileinto.sieve |   3 +++
 2 files changed, 31 insertions(+), 0 deletions(-)

diffs (42 lines):

diff -r 0cd57d84f9ec -r a8ca165ee741 tests/execute/errors.svtest
--- a/tests/execute/errors.svtest	Sat Jun 19 14:27:46 2010 +0200
+++ b/tests/execute/errors.svtest	Thu Jul 08 00:43:03 2010 +0200
@@ -80,3 +80,31 @@
 		test_fail "unexpected error reported";
 	}
 }
+
+test "Fileinto missing folder" {
+    if not test_script_compile "errors/fileinto.sieve" {
+        test_fail "compile failed";
+    }
+
+    test_mailbox :create "INBOX";
+
+    if not test_script_run {
+        test_fail "execution failed";
+    }
+
+    if test_result_execute {
+        test_fail "execution of result should have failed";
+    }
+
+    if test_error :count "gt" :comparator "i;ascii-numeric" "1" {
+        test_fail "too many runtime errors reported";
+    }
+
+	if not allof (
+		test_error :index 1 :contains "failed to store into mailbox",
+		test_error :index 1 :contains "exist",
+		test_error :index 1 :contains "FROP") {
+        test_fail "unexpected error reported";
+    }
+}
+
diff -r 0cd57d84f9ec -r a8ca165ee741 tests/execute/errors/fileinto.sieve
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/execute/errors/fileinto.sieve	Thu Jul 08 00:43:03 2010 +0200
@@ -0,0 +1,3 @@
+require "fileinto";
+
+fileinto "FROP";


More information about the dovecot-cvs mailing list