dovecot-2.0-pigeonhole: Testsuite: partly cleaned up test script...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Mon Aug 30 02:36:11 EEST 2010
details: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/47a4f48a51a8
changeset: 1394:47a4f48a51a8
user: Stephan Bosch <stephan at rename-it.nl>
date: Sun Aug 29 11:34:40 2010 +0200
description:
Testsuite: partly cleaned up test scripts (rest is post-v0.2).
diffstat:
Makefile.am | 29 +-
TODO | 9 +-
tests/address.svtest | 111 ----
tests/comparators/core.svtest | 65 --
tests/comparators/i-ascii-casemap.svtest | 39 +
tests/comparators/i-octet.svtest | 37 +
tests/compile/errors.svtest | 145 +++---
tests/compile/errors/match-type.sieve | 2 +-
tests/compile/recover.svtest | 36 +-
tests/compile/recover/commands-endblock.sieve | 3 +
tests/compile/recover/commands-semicolon.sieve | 9 +
tests/compile/recover/tests-endcomma.sieve | 21 +-
tests/compile/warnings.svtest | 6 +-
tests/compile/warnings/eof.sieve | 2 +-
tests/compile/warnings/invalid-headers.sieve | 3 +
tests/control-if.svtest | 162 ++++++
tests/control-stop.svtest | 29 +
tests/control-structures.svtest | 149 ------
tests/deprecated/imapflags/execute.svtest | 56 +-
tests/deprecated/notify/denotify.svtest | 104 ++--
tests/execute/smtp.svtest | 31 +-
tests/exists.svtest | 42 -
tests/extensions/encoded-character.svtest | 46 +-
tests/extensions/envelope.svtest | 79 +-
tests/extensions/imap4flags/basic.svtest | 124 ++--
tests/extensions/imap4flags/flagstore.svtest | 80 +-
tests/extensions/imap4flags/flagstring.svtest | 48 +-
tests/extensions/imap4flags/multiscript.svtest | 2 +-
tests/extensions/imap4flags/multiscript/group-spam.sieve | 16 +-
tests/extensions/imap4flags/multiscript/sent-store.sieve | 2 +-
tests/extensions/include/included/rfc-ex1-always_allow.sieve | 4 +-
tests/extensions/include/included/rfc-ex1-mailing_lists.sieve | 4 +-
tests/extensions/regex/match-values.svtest | 4 +
tests/extensions/relational/basic.svtest | 48 +-
tests/extensions/relational/comparators.svtest | 32 +-
tests/extensions/spamvirustest/virustest.svtest | 30 +-
tests/extensions/subaddress/basic.svtest | 30 +-
tests/extensions/subaddress/config.svtest | 60 +-
tests/extensions/vacation/execute/no-handle.sieve | 5 +-
tests/header.svtest | 57 --
tests/match-types/contains.svtest | 4 +-
tests/multiscript/conflicts.svtest | 14 +-
tests/size.svtest | 29 -
tests/test-address.svtest | 372 +++++++++++++++
tests/test-allof.svtest | 158 ++++++
tests/test-anyof.svtest | 156 ++++++
tests/test-exists.svtest | 93 +++
tests/test-header.svtest | 270 +++++++++++
tests/test-size.svtest | 74 +++
tests/testsuite.svtest | 28 +-
50 files changed, 1966 insertions(+), 993 deletions(-)
diffs (truncated from 4029 to 300 lines):
diff -r 1701bfb17ce0 -r 47a4f48a51a8 Makefile.am
--- a/Makefile.am Sat Aug 28 13:13:16 2010 +0200
+++ b/Makefile.am Sun Aug 29 11:34:40 2010 +0200
@@ -39,8 +39,15 @@
endif
test_cases = \
- tests/testsuite.svtest\
- tests/control-structures.svtest \
+ tests/testsuite.svtest \
+ tests/control-if.svtest \
+ tests/control-stop.svtest \
+ tests/test-allof.svtest \
+ tests/test-anyof.svtest \
+ tests/test-exists.svtest \
+ tests/test-header.svtest \
+ tests/test-address.svtest \
+ tests/test-size.svtest \
tests/compile/compile.svtest \
tests/compile/errors.svtest \
tests/compile/warnings.svtest \
@@ -50,15 +57,14 @@
tests/execute/smtp.svtest \
tests/execute/mailstore.svtest \
tests/execute/examples.svtest \
- tests/exists.svtest \
- tests/header.svtest \
- tests/address.svtest \
- tests/size.svtest \
tests/lexer.svtest \
- tests/comparators/core.svtest \
+ tests/comparators/i-octet.svtest \
+ tests/comparators/i-ascii-casemap.svtest \
tests/match-types/is.svtest \
tests/match-types/contains.svtest \
tests/match-types/matches.svtest \
+ tests/multiscript/basic.svtest \
+ tests/multiscript/conflicts.svtest \
tests/extensions/encoded-character.svtest \
tests/extensions/envelope.svtest \
tests/extensions/variables/basic.svtest \
@@ -114,7 +120,10 @@
tests/extensions/date/basic.svtest \
tests/extensions/date/date-parts.svtest \
tests/extensions/date/zones.svtest \
- tests/multiscript/basic.svtest \
+ tests/extensions/spamvirustest/spamtest.svtest \
+ tests/extensions/spamvirustest/virustest.svtest \
+ tests/extensions/spamvirustest/spamtestplus.svtest \
+ tests/extensions/spamvirustest/errors.svtest \
tests/deprecated/notify/basic.svtest \
tests/deprecated/notify/mailto.svtest \
tests/deprecated/notify/errors.svtest \
@@ -122,10 +131,6 @@
tests/deprecated/notify/denotify.svtest \
tests/deprecated/imapflags/execute.svtest \
tests/deprecated/imapflags/errors.svtest \
- tests/extensions/spamvirustest/spamtest.svtest \
- tests/extensions/spamvirustest/virustest.svtest \
- tests/extensions/spamvirustest/spamtestplus.svtest \
- tests/extensions/spamvirustest/errors.svtest \
$(test_unfinished)
$(test_cases):
diff -r 1701bfb17ce0 -r 47a4f48a51a8 TODO
--- a/TODO Sat Aug 28 13:13:16 2010 +0200
+++ b/TODO Sun Aug 29 11:34:40 2010 +0200
@@ -4,8 +4,6 @@
- Avoid reporting user-caused errors to the master log.
- Review logging and error handling; add more warning/info/debug messages
where useful.
-* Cleanup the test suite
- - Cleanup test scripts
Next (in order of descending priority/precedence):
@@ -28,11 +26,14 @@
- Implement proper :content "multipart" behavior
- Implement proper :content "message/rfc822" behavior
- Build test cases for decoding MIME encodings to UTF-8
-* Implement index extension
+* Cleanup the test suite
+ - Restructure test scripts
+ - Add more comment on purpose of tests
* Build a sieve tool to filter an entire existing mailbox through a Sieve
script:
- Add commandline options to fully customize execution
- Write manual page
+* Implement index extension
* Update include extension to latest draft (v05 currently):
- Implement required ManageSieve behavior (pending IETF discussion)
* Vacation extension improvements:
@@ -58,7 +59,7 @@
* Make testsuite much more exhaustive:
- Add support for testing the content of result actions
- Test as many error/warning/info conditions as possible.
- - Review the specification documents and check whether the given conditions
+ - Review the specification documents and check whether the given requirements
are tested at least once.
* Fix ManageSieve proxy to recognize response codes from the backend and forward
them to the user if appropriate/safe.
diff -r 1701bfb17ce0 -r 47a4f48a51a8 tests/address.svtest
--- a/tests/address.svtest Sat Aug 28 13:13:16 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-require "vnd.dovecot.testsuite";
-
-/*
- * If an address is not syntactically valid, then it will not be matched
- * by tests specifying ":localpart" or ":domain".
- */
-
-test_set "message" text:
-From: stephan@
-To: @example.org
-Cc: nonsense
-Resent-To:
-Subject: Invalid addresses
-
-Test.
-.
-;
-
-test "Invalid single addresses" {
- if address :localpart "from" "stephan" {
- test_fail ":localpart matched invalid address";
- }
-
- if address :domain "to" "example.org" {
- test_fail ":domain matched invalid address";
- }
-
- if not address :is :all "resent-to" "" {
- test_fail ":all failed to match empty address";
- }
-
- if not address :is :all "cc" "nonsense" {
- test_fail ":all failed to match invalid address";
- }
-}
-
-/*
- * Errors in address lists
- */
-
-test_set "message" text:
-From: stephan@
-To: nico at frop.example.com, @example.org
-Cc: stephan at example.org, nonsense
-Subject: Invalid addresses
-
-Test.
-.
-;
-
-test "Invalid address list" {
- if address :is :localpart "to" "" {
- test_fail ":localpart matched invalid address";
- }
-
- if address :is :domain "to" "example.org" {
- test_fail ":domain matched invalid address";
- }
-}
-
-/*
- * Undisclosed recipients
- */
-
-test_set "message" text:
-From: stephan@
-To: undisclosed-recipients:;
-Subject: Invalid addresses
-
-Test.
-.
-;
-
-test "Undisclosed recipients" {
- if address :is :domain "to" "undisclosed-recipients:;" {
- test_fail ":domain matched group name";
- }
-
- if address :is :localpart "to" "undisclosed-recipients:;" {
- test_fail ":localpart matched group name";
- }
-}
-
-/*
- * Strange
- */
-
-test_set "message" text:
-From: SPAM at MYDOMAIN
-To: stephan at example.org
-Subject: Spam
-
-Spam!
-.
-;
-
-test "Questionable address" {
- if address :domain :is "from" "MYDOMAIN" {
- if address :localpart :is "from" "SPAM" {
-
- } elsif header :contains "subject" "Cron" {
- test_fail "message erroneously recognized as cron";
- } else {
- test_fail "message erroneously recognized as normal";
- }
- } else {
- test_fail "message domain not recognized";
- }
-}
-
-
diff -r 1701bfb17ce0 -r 47a4f48a51a8 tests/comparators/core.svtest
--- a/tests/comparators/core.svtest Sat Aug 28 13:13:16 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-require "vnd.dovecot.testsuite";
-
-test_set "message" text:
-From: stephan at example.org
-Cc: frop at example.com
-To: test at dovecot.example.net
-X-A: This is a TEST header
-Subject: Test Message
-
-Test!
-.
-;
-
-# Comparator Tests
-
-test "CMP-octet-CONTAINS" {
- if not header :contains :comparator "i;octet" "X-A" "TEST" {
- test_fail "should have matched";
- }
-}
-
-test "CMP-octet-NOTCONTAINS" {
- if header :contains :comparator "i;octet" "X-A" "test" {
- test_fail "should not have matched";
- }
-}
-
-test "CMP-octet-MATCH" {
- if not header :matches :comparator "i;octet" "X-A" "This*TEST*r" {
- test_fail "should have matched";
- }
-}
-
-test "CMP-octet-NOTMATCH" {
- if header :matches :comparator "i;octet" "X-A" "ThIs*tEsT*R" {
- test_fail "should not have matched";
- }
-}
-
-test "CMP-ascii-casemap-CONTAINS-1" {
- if not header :contains :comparator "i;ascii-casemap" "X-A" "TEST" {
- test_fail "should have matched";
- }
-}
-
-test "CMP-ascii-casemap-CONTAINS-2" {
- if not header :contains :comparator "i;ascii-casemap" "X-A" "test" {
- test_fail "should have matched";
- }
-}
-
-test "CMP-ascii-casemap-MATCH-1" {
- if not header :matches :comparator "i;ascii-casemap" "X-A" "This*TEST*r" {
- test_fail "should have matched";
- }
-}
-
-test "CMP-ascii-casemap-MATCH-2" {
- if not header :matches :comparator "i;ascii-casemap" "X-A" "ThIs*tEsT*R" {
- test_fail "should have matched";
- }
-}
-
-
-
diff -r 1701bfb17ce0 -r 47a4f48a51a8 tests/comparators/i-ascii-casemap.svtest
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/comparators/i-ascii-casemap.svtest Sun Aug 29 11:34:40 2010 +0200
@@ -0,0 +1,39 @@
+require "vnd.dovecot.testsuite";
+
+test_set "message" text:
+From: stephan at example.org
+Cc: frop at example.com
+To: test at dovecot.example.net
+X-A: This is a TEST header
+Subject: Test Message
+
+Test!
+.
More information about the dovecot-cvs
mailing list