dovecot-2.0-pigeonhole: Testsuite: added a few test for the rege...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Sat Aug 14 01:43:09 EEST 2010
details: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/f152c6e113e3
changeset: 1373:f152c6e113e3
user: Stephan Bosch <stephan at rename-it.nl>
date: Sat Aug 14 00:42:24 2010 +0200
description:
Testsuite: added a few test for the regex extension.
diffstat:
tests/extensions/regex/basic.svtest | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r dce269f7665f -r f152c6e113e3 tests/extensions/regex/basic.svtest
--- a/tests/extensions/regex/basic.svtest Sat Aug 14 00:25:44 2010 +0200
+++ b/tests/extensions/regex/basic.svtest Sat Aug 14 00:42:24 2010 +0200
@@ -4,7 +4,7 @@
test_set "message" text:
From: stephan+sieve at friep.example.com
-To: tss at example.net
+To: tss at example.net, nico at nl.example.com, sirius at fi.example.com
Subject: Test
Test message.
@@ -18,4 +18,21 @@
] {
test_fail "failed to match";
}
+}
+
+test "No values" {
+ if header :regex "cc" [".*\\.com", ".*\\.nl"] {
+ test_fail "matched inappropriately";
+ }
}
+
+
+test "More values" {
+ if address :regex "to" [".*\\.uk", ".*\\.nl", ".*\\.tk"] {
+ test_fail "matched inappropriately";
+ }
+
+ if not address :regex "to" [".*\\.uk", ".*\\.nl", ".*\\.tk", ".*fi\\..*"] {
+ test_fail "failed to match last";
+ }
+}
More information about the dovecot-cvs
mailing list