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 @@ ...@@ -18,8 +18,6 @@
18 m4_pushdef([MUT_SIEVE_MAILBOX],[relational.mbox]) 18 m4_pushdef([MUT_SIEVE_MAILBOX],[relational.mbox])
19 MUT_TESTCASE([multiple addresses],[test address mul-addr], 19 MUT_TESTCASE([multiple addresses],[test address mul-addr],
20 [ 20 [
21 require "fileinto";
22
23 if address :localpart :is [["To", "Cc"]] [[ "foo", "oof" ]] 21 if address :localpart :is [["To", "Cc"]] [[ "foo", "oof" ]]
24 { 22 {
25 discard; 23 discard;
......
...@@ -44,6 +44,7 @@ s/^\( *[[0-9]][[0-9]]*:\) --[[0-9]].*/\1 --(boundary)/ ...@@ -44,6 +44,7 @@ s/^\( *[[0-9]][[0-9]]*:\) --[[0-9]].*/\1 --(boundary)/
44 # Same goes for dates. 44 # Same goes for dates.
45 s/^\( *[[0-9]][[0-9]]*: The original message was received at *\).*\( from .*\)/\1(date)\2/ 45 s/^\( *[[0-9]][[0-9]]*: The original message was received at *\).*\( from .*\)/\1(date)\2/
46 s/^\( *[[0-9]][[0-9]]*: Last-Attempt-Date:\).*/\1 (date)/ 46 s/^\( *[[0-9]][[0-9]]*: Last-Attempt-Date:\).*/\1 (date)/
47 s/^\( *[[0-9]][[0-9]]*: Arrival-Date:\).*/\1 (date)/
47 ]) 48 ])
48 49
49 MUT_MBCOPY($abs_top_srcdir/testsuite/spool/MUT_SIEVE_MAILBOX) 50 MUT_MBCOPY($abs_top_srcdir/testsuite/spool/MUT_SIEVE_MAILBOX)
...@@ -74,7 +75,7 @@ ENVELOPE TO: <coyote@desert.example.org> ...@@ -74,7 +75,7 @@ ENVELOPE TO: <coyote@desert.example.org>
74 17: Content-Type: message/delivery-status 75 17: Content-Type: message/delivery-status
75 18: 76 18:
76 19: Reporting-UA: sieve; GNU Mailutils 2.2.90 77 19: Reporting-UA: sieve; GNU Mailutils 2.2.90
77 20: Arrival-Date: Mon, May 07 01:16:47 2001 EEST 78 20: Arrival-Date: (date)
78 21: Final-Recipient: RFC822; foobar@nonexistent.net 79 21: Final-Recipient: RFC822; foobar@nonexistent.net
79 22: Action: deleted 80 22: Action: deleted
80 23: Disposition: automatic-action/MDN-sent-automatically;deleted 81 23: Disposition: automatic-action/MDN-sent-automatically;deleted
...@@ -124,7 +125,7 @@ ENVELOPE TO: <b1ff@de.res.example.com> ...@@ -124,7 +125,7 @@ ENVELOPE TO: <b1ff@de.res.example.com>
124 17: Content-Type: message/delivery-status 125 17: Content-Type: message/delivery-status
125 18: 126 18:
126 19: Reporting-UA: sieve; GNU Mailutils 2.2.90 127 19: Reporting-UA: sieve; GNU Mailutils 2.2.90
127 20: Arrival-Date: Mon, May 07 01:17:15 2001 EEST 128 20: Arrival-Date: (date)
128 21: Final-Recipient: RFC822; foobar@nonexistent.net 129 21: Final-Recipient: RFC822; foobar@nonexistent.net
129 22: Action: deleted 130 22: Action: deleted
130 23: Disposition: automatic-action/MDN-sent-automatically;deleted 131 23: Disposition: automatic-action/MDN-sent-automatically;deleted
...@@ -172,7 +173,7 @@ ENVELOPE TO: <bar@dontmailme.org> ...@@ -172,7 +173,7 @@ ENVELOPE TO: <bar@dontmailme.org>
172 17: Content-Type: message/delivery-status 173 17: Content-Type: message/delivery-status
173 18: 174 18:
174 19: Reporting-UA: sieve; GNU Mailutils 2.2.90 175 19: Reporting-UA: sieve; GNU Mailutils 2.2.90
175 20: Arrival-Date: Sat, Dec 29 01:28:09 2001 EET 176 20: Arrival-Date: (date)
176 21: Final-Recipient: RFC822; foobar@nonexistent.net 177 21: Final-Recipient: RFC822; foobar@nonexistent.net
177 22: Action: deleted 178 22: Action: deleted
178 23: Disposition: automatic-action/MDN-sent-automatically;deleted 179 23: Disposition: automatic-action/MDN-sent-automatically;deleted
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
16 # This file is part of Mailfromd testsuite. 16 # This file is part of Mailfromd testsuite.
17 17
18 m4_pushdef([MUT_SIEVE_MAILBOX],[relational.mbox]) 18 m4_pushdef([MUT_SIEVE_MAILBOX],[relational.mbox])
19 m4_pushdef([MUT_SIEVE_OPTIONS],[--set ":mailbox:folder=`pwd`"]) 19 m4_pushdef([MUT_SIEVE_OPTIONS],[--set ":mailbox:folder=`pwd`" dnl
20 --set ":mailbox:mailbox-pattern=`pwd`/"'${user}'])
20 21
21 MUT_TESTCASE([relational address],[test relational address comparator i-ascii-numeric], 22 MUT_TESTCASE([relational address],[test relational address comparator i-ascii-numeric],
22 [ 23 [
...@@ -58,6 +59,8 @@ IMPLICIT KEEP on msg uid 8 ...@@ -58,6 +59,8 @@ IMPLICIT KEEP on msg uid 8
58 DISCARD on msg uid 9: marking as deleted 59 DISCARD on msg uid 9: marking as deleted
59 ]) 60 ])
60 61
62 m4_pushdef([FILEEXISTS],[test -f "$1" || echo "$1 missing"])
63
61 MUT_TESTCASE([relational big test],[test relational relational-hairy], 64 MUT_TESTCASE([relational big test],[test relational relational-hairy],
62 [ 65 [
63 require [["relational", "comparator-i;ascii-numeric", "fileinto"]]; 66 require [["relational", "comparator-i;ascii-numeric", "fileinto"]];
...@@ -88,7 +91,14 @@ if allof (address :count "eq" :comparator "i;ascii-numeric" ...@@ -88,7 +91,14 @@ if allof (address :count "eq" :comparator "i;ascii-numeric"
88 { 91 {
89 fileinto "%Only_me"; 92 fileinto "%Only_me";
90 } 93 }
91 ],[],[0],[], 94 ],
95 [
96 FILEEXISTS([From_A-M])
97 FILEEXISTS([From_N-Z])
98 FILEEXISTS([Priority])
99 FILEEXISTS([Only_me])
100 FILEEXISTS([SPAM])
101 ],[0],[],
92 [FILEINTO on msg uid 1: delivering into %From_A-M 102 [FILEINTO on msg uid 1: delivering into %From_A-M
93 FILEINTO on msg uid 2: delivering into %From_N-Z 103 FILEINTO on msg uid 2: delivering into %From_N-Z
94 FILEINTO on msg uid 3: delivering into %Priority 104 FILEINTO on msg uid 3: delivering into %Priority
...@@ -100,6 +110,6 @@ FILEINTO on msg uid 8: delivering into %From_A-M ...@@ -100,6 +110,6 @@ FILEINTO on msg uid 8: delivering into %From_A-M
100 FILEINTO on msg uid 8: delivering into %Only_me 110 FILEINTO on msg uid 8: delivering into %Only_me
101 FILEINTO on msg uid 9: delivering into %SPAM 111 FILEINTO on msg uid 9: delivering into %SPAM
102 ]) 112 ])
103 113 m4_popdef([FILEEXISTS])
104 m4_popdef([MUT_SIEVE_MAILBOX]) 114 m4_popdef([MUT_SIEVE_MAILBOX])
105 m4_popdef([MUT_SIEVE_OPTIONS]) 115 m4_popdef([MUT_SIEVE_OPTIONS])
......