Commit 274ca0bf 274ca0bfebbb4881ee9a3a01a239b6659dd64705 by Sergey Poznyakoff

Bugfixes in the sieve testsuite.

* sieve/tests/reject.at: Fix dependency on TZ.
* sieve/tests/relational.at: Ensure that fileintos go
to the test folder.
* sieve/tests/mul-addr.at: Remove unneeded require.
1 parent 4362a34e
......@@ -18,8 +18,6 @@
m4_pushdef([MUT_SIEVE_MAILBOX],[relational.mbox])
MUT_TESTCASE([multiple addresses],[test address mul-addr],
[
require "fileinto";
if address :localpart :is [["To", "Cc"]] [[ "foo", "oof" ]]
{
discard;
......
......@@ -44,6 +44,7 @@ s/^\( *[[0-9]][[0-9]]*:\) --[[0-9]].*/\1 --(boundary)/
# Same goes for dates.
s/^\( *[[0-9]][[0-9]]*: The original message was received at *\).*\( from .*\)/\1(date)\2/
s/^\( *[[0-9]][[0-9]]*: Last-Attempt-Date:\).*/\1 (date)/
s/^\( *[[0-9]][[0-9]]*: Arrival-Date:\).*/\1 (date)/
])
MUT_MBCOPY($abs_top_srcdir/testsuite/spool/MUT_SIEVE_MAILBOX)
......@@ -74,7 +75,7 @@ ENVELOPE TO: <coyote@desert.example.org>
17: Content-Type: message/delivery-status
18:
19: Reporting-UA: sieve; GNU Mailutils 2.2.90
20: Arrival-Date: Mon, May 07 01:16:47 2001 EEST
20: Arrival-Date: (date)
21: Final-Recipient: RFC822; foobar@nonexistent.net
22: Action: deleted
23: Disposition: automatic-action/MDN-sent-automatically;deleted
......@@ -124,7 +125,7 @@ ENVELOPE TO: <b1ff@de.res.example.com>
17: Content-Type: message/delivery-status
18:
19: Reporting-UA: sieve; GNU Mailutils 2.2.90
20: Arrival-Date: Mon, May 07 01:17:15 2001 EEST
20: Arrival-Date: (date)
21: Final-Recipient: RFC822; foobar@nonexistent.net
22: Action: deleted
23: Disposition: automatic-action/MDN-sent-automatically;deleted
......@@ -172,7 +173,7 @@ ENVELOPE TO: <bar@dontmailme.org>
17: Content-Type: message/delivery-status
18:
19: Reporting-UA: sieve; GNU Mailutils 2.2.90
20: Arrival-Date: Sat, Dec 29 01:28:09 2001 EET
20: Arrival-Date: (date)
21: Final-Recipient: RFC822; foobar@nonexistent.net
22: Action: deleted
23: Disposition: automatic-action/MDN-sent-automatically;deleted
......
......@@ -16,7 +16,8 @@
# This file is part of Mailfromd testsuite.
m4_pushdef([MUT_SIEVE_MAILBOX],[relational.mbox])
m4_pushdef([MUT_SIEVE_OPTIONS],[--set ":mailbox:folder=`pwd`"])
m4_pushdef([MUT_SIEVE_OPTIONS],[--set ":mailbox:folder=`pwd`" dnl
--set ":mailbox:mailbox-pattern=`pwd`/"'${user}'])
MUT_TESTCASE([relational address],[test relational address comparator i-ascii-numeric],
[
......@@ -58,6 +59,8 @@ IMPLICIT KEEP on msg uid 8
DISCARD on msg uid 9: marking as deleted
])
m4_pushdef([FILEEXISTS],[test -f "$1" || echo "$1 missing"])
MUT_TESTCASE([relational big test],[test relational relational-hairy],
[
require [["relational", "comparator-i;ascii-numeric", "fileinto"]];
......@@ -88,7 +91,14 @@ if allof (address :count "eq" :comparator "i;ascii-numeric"
{
fileinto "%Only_me";
}
],[],[0],[],
],
[
FILEEXISTS([From_A-M])
FILEEXISTS([From_N-Z])
FILEEXISTS([Priority])
FILEEXISTS([Only_me])
FILEEXISTS([SPAM])
],[0],[],
[FILEINTO on msg uid 1: delivering into %From_A-M
FILEINTO on msg uid 2: delivering into %From_N-Z
FILEINTO on msg uid 3: delivering into %Priority
......@@ -100,6 +110,6 @@ FILEINTO on msg uid 8: delivering into %From_A-M
FILEINTO on msg uid 8: delivering into %Only_me
FILEINTO on msg uid 9: delivering into %SPAM
])
m4_popdef([FILEEXISTS])
m4_popdef([MUT_SIEVE_MAILBOX])
m4_popdef([MUT_SIEVE_OPTIONS])
......