Exercise a little more of sieve.
Showing
6 changed files
with
61 additions
and
277 deletions
... | @@ -2,11 +2,15 @@ | ... | @@ -2,11 +2,15 @@ |
2 | 2 | ||
3 | default: test-complex | 3 | default: test-complex |
4 | 4 | ||
5 | HOME :=$(shell pwd) | ||
6 | |||
7 | export HOME | ||
8 | |||
5 | .PHONY: test-complex | 9 | .PHONY: test-complex |
6 | test-complex: | 10 | test-complex: |
7 | rm -f mbox.complex.* | 11 | rm -f mbox.complex.* |
8 | grep -v X-UID < mbox.complex > mbox.complex.in | 12 | grep -v X-UID < mbox.complex > mbox.complex.in |
9 | ../sieve -k -f mbox.complex.in t-complex.sv | 13 | HOME=`pwd` ../sieve -k -f mbox.complex.in t-complex.sv |
10 | 14 | ||
11 | test: INBOX | 15 | test: INBOX |
12 | ./Test 2>&1 | tee test.out | 16 | ./Test 2>&1 | tee test.out | ... | ... |
sieve/examples/mbox.complex
deleted
100644 → 0
This diff could not be displayed because it is too large.
... | @@ -6,7 +6,9 @@ Test: ex-2.7.3.sv | ... | @@ -6,7 +6,9 @@ Test: ex-2.7.3.sv |
6 | Test: ex-3.1a.sv | 6 | Test: ex-3.1a.sv |
7 | Test: ex-3.1b.sv | 7 | Test: ex-3.1b.sv |
8 | Test: ex-3.2.sv | 8 | Test: ex-3.2.sv |
9 | ex-3.2.sv:1: unsupported feature | ||
9 | Test: ex-4.1.sv | 10 | Test: ex-4.1.sv |
11 | ex-4.1.sv:1: unsupported feature | ||
10 | Test: ex-4.2.sv | 12 | Test: ex-4.2.sv |
11 | Test: ex-4.4a.sv | 13 | Test: ex-4.4a.sv |
12 | Test: ex-4.4b.sv | 14 | Test: ex-4.4b.sv |
... | @@ -14,312 +16,89 @@ Test: ex-4.5.sv | ... | @@ -14,312 +16,89 @@ Test: ex-4.5.sv |
14 | Test: ex-5.1.sv | 16 | Test: ex-5.1.sv |
15 | Test: ex-5.7.sv | 17 | Test: ex-5.7.sv |
16 | Test: ex-9.sv | 18 | Test: ex-9.sv |
19 | ex-9.sv:5: unsupported feature | ||
17 | Test: ex-null.sv | 20 | Test: ex-null.sv |
21 | Test: ex-save-all.sv | ||
22 | Test: ex-stop.sv | ||
18 | Test: exn-2.3b.sv might fail | 23 | Test: exn-2.3b.sv might fail |
19 | Test: exn-5.4.sv might fail | 24 | Test: exn-5.4.sv might fail |
20 | == Action testing | 25 | == Action testing |
21 | 26 | ||
22 | Test: ex-1.10.2.sv | 27 | Test: ex-1.10.2.sv |
23 | mbox had 2 messages... | 28 | discard - deleting failed: [0] Success |
24 | getsize -> 587 | 29 | discard - deleting failed: [0] Success |
25 | action => DISCARD | 30 | DISCARD on msg uid 1: marking as deleted |
26 | action => KEEP | 31 | KEEP on msg uid 1 |
27 | Action(s) taken: | 32 | DISCARD on msg uid 2: marking as deleted |
28 | Discarded | 33 | KEEP on msg uid 2 |
29 | Kept | ||
30 | |||
31 | getsize -> 539 | ||
32 | action => DISCARD | ||
33 | action => KEEP | ||
34 | Action(s) taken: | ||
35 | Discarded | ||
36 | Kept | ||
37 | |||
38 | 34 | ||
39 | Test: ex-2.3a.sv | 35 | Test: ex-2.3a.sv |
40 | mbox had 2 messages... | 36 | discard - deleting failed: [0] Success |
41 | getsize -> 587 | 37 | DISCARD on msg uid 1: marking as deleted |
42 | action => DISCARD | 38 | KEEP on msg uid 2 |
43 | Action(s) taken: | ||
44 | Discarded | ||
45 | |||
46 | getsize -> 539 | ||
47 | action => KEEP | ||
48 | Action(s) taken: | ||
49 | Kept | ||
50 | |||
51 | 39 | ||
52 | Test: ex-2.5.1.sv | 40 | Test: ex-2.5.1.sv |
53 | mbox had 2 messages... | 41 | discard - deleting failed: [0] Success |
54 | getheader, filling cache with 4 fields | 42 | DISCARD on msg uid 1: marking as deleted |
55 | getheader, cacheing X-Caffeine=C8H10N4O2 | 43 | FILEINTO on msg uid 1: delivering into popbox |
56 | getheader, cacheing Subject=I have a present for you | 44 | KEEP on msg uid 2 |
57 | getheader, cacheing To=roadrunner@acme.example.com | ||
58 | getheader, cacheing From=coyote@desert.example.org | ||
59 | getheader, From=coyote@desert.example.org | ||
60 | getheader Date, failed No such file or directory | ||
61 | getheader, from=coyote@desert.example.org | ||
62 | action => DISCARD | ||
63 | action => FILEINTO | ||
64 | into <popbox> | ||
65 | fail with [2] no handler for this type of mailbox | ||
66 | runtime error: Fileinto: no handler for this type of mailbox | ||
67 | Action(s) taken: | ||
68 | Discarded | ||
69 | Fileinto action failed: no handler for this type of mailbox | ||
70 | |||
71 | sieve_execute_script(1): sieve -1237848064 rc No error | ||
72 | 45 | ||
73 | Test: ex-2.7.3.sv | 46 | Test: ex-2.7.3.sv |
74 | mbox had 2 messages... | 47 | KEEP on msg uid 1 |
75 | getheader, filling cache with 4 fields | 48 | KEEP on msg uid 2 |
76 | getheader, cacheing X-Caffeine=C8H10N4O2 | ||
77 | getheader, cacheing Subject=I have a present for you | ||
78 | getheader, cacheing To=roadrunner@acme.example.com | ||
79 | getheader, cacheing From=coyote@desert.example.org | ||
80 | getheader, Subject=I have a present for you | ||
81 | action => KEEP | ||
82 | Action(s) taken: | ||
83 | Kept | ||
84 | |||
85 | getheader, filling cache with 4 fields | ||
86 | getheader, cacheing Date=TBD | ||
87 | getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
88 | getheader, cacheing To=rube@landru.example.edu | ||
89 | getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid | ||
90 | getheader, Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
91 | action => KEEP | ||
92 | Action(s) taken: | ||
93 | Kept | ||
94 | |||
95 | 49 | ||
96 | Test: ex-3.1a.sv | 50 | Test: ex-3.1a.sv |
97 | mbox had 2 messages... | 51 | discard - deleting failed: [0] Success |
98 | getheader, filling cache with 4 fields | 52 | discard - deleting failed: [0] Success |
99 | getheader, cacheing X-Caffeine=C8H10N4O2 | 53 | DISCARD on msg uid 1: marking as deleted |
100 | getheader, cacheing Subject=I have a present for you | 54 | DISCARD on msg uid 2: marking as deleted |
101 | getheader, cacheing To=roadrunner@acme.example.com | ||
102 | getheader, cacheing From=coyote@desert.example.org | ||
103 | getheader, from=coyote@desert.example.org | ||
104 | action => DISCARD | ||
105 | Action(s) taken: | ||
106 | Discarded | ||
107 | |||
108 | getheader, filling cache with 4 fields | ||
109 | getheader, cacheing Date=TBD | ||
110 | getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
111 | getheader, cacheing To=rube@landru.example.edu | ||
112 | getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid | ||
113 | getheader, from=youcouldberich!@reply-by-postal-mail.invalid | ||
114 | getheader, subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
115 | action => DISCARD | ||
116 | Action(s) taken: | ||
117 | Discarded | ||
118 | |||
119 | 55 | ||
120 | Test: ex-3.1b.sv | 56 | Test: ex-3.1b.sv |
121 | mbox had 2 messages... | 57 | REDIRECT on msg uid 1: to acm@example.edu |
122 | getheader, filling cache with 4 fields | 58 | REDIRECT on msg uid 2: to postmaster@example.edu |
123 | getheader, cacheing X-Caffeine=C8H10N4O2 | ||
124 | getheader, cacheing Subject=I have a present for you | ||
125 | getheader, cacheing To=roadrunner@acme.example.com | ||
126 | getheader, cacheing From=coyote@desert.example.org | ||
127 | getheader, From=coyote@desert.example.org | ||
128 | action => REDIRECT | ||
129 | Action(s) taken: | ||
130 | Redirected to acm@example.edu | ||
131 | |||
132 | getheader, filling cache with 4 fields | ||
133 | getheader, cacheing Date=TBD | ||
134 | getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
135 | getheader, cacheing To=rube@landru.example.edu | ||
136 | getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid | ||
137 | getheader, From=youcouldberich!@reply-by-postal-mail.invalid | ||
138 | getheader, Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
139 | action => REDIRECT | ||
140 | Action(s) taken: | ||
141 | Redirected to postmaster@example.edu | ||
142 | |||
143 | 59 | ||
144 | Test: ex-3.2.sv | 60 | Test: ex-3.2.sv |
145 | mbox had 2 messages... | 61 | ex-3.2.sv:1: unsupported feature |
146 | action => KEEP | ||
147 | Action(s) taken: | ||
148 | Kept | ||
149 | |||
150 | action => KEEP | ||
151 | Action(s) taken: | ||
152 | Kept | ||
153 | |||
154 | 62 | ||
155 | Test: ex-4.1.sv | 63 | Test: ex-4.1.sv |
156 | mbox had 2 messages... | 64 | ex-4.1.sv:1: unsupported feature |
157 | getheader, filling cache with 4 fields | ||
158 | getheader, cacheing X-Caffeine=C8H10N4O2 | ||
159 | getheader, cacheing Subject=I have a present for you | ||
160 | getheader, cacheing To=roadrunner@acme.example.com | ||
161 | getheader, cacheing From=coyote@desert.example.org | ||
162 | getheader, from=coyote@desert.example.org | ||
163 | action => REJECT | ||
164 | Action(s) taken: | ||
165 | Rejected with: I am not taking mail from you, and I don't want | ||
166 | your birdseed, either! | ||
167 | |||
168 | getheader, filling cache with 4 fields | ||
169 | getheader, cacheing Date=TBD | ||
170 | getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
171 | getheader, cacheing To=rube@landru.example.edu | ||
172 | getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid | ||
173 | getheader, from=youcouldberich!@reply-by-postal-mail.invalid | ||
174 | action => KEEP | ||
175 | Action(s) taken: | ||
176 | Kept | ||
177 | |||
178 | 65 | ||
179 | Test: ex-4.2.sv | 66 | Test: ex-4.2.sv |
180 | mbox had 2 messages... | 67 | FILEINTO on msg uid 1: delivering into INBOX.harassment |
181 | getheader, filling cache with 4 fields | 68 | KEEP on msg uid 2 |
182 | getheader, cacheing X-Caffeine=C8H10N4O2 | ||
183 | getheader, cacheing Subject=I have a present for you | ||
184 | getheader, cacheing To=roadrunner@acme.example.com | ||
185 | getheader, cacheing From=coyote@desert.example.org | ||
186 | getheader, from=coyote@desert.example.org | ||
187 | action => FILEINTO | ||
188 | into <INBOX.harassment> | ||
189 | fail with [2] no handler for this type of mailbox | ||
190 | runtime error: Fileinto: no handler for this type of mailbox | ||
191 | Action(s) taken: | ||
192 | Fileinto action failed: no handler for this type of mailbox | ||
193 | |||
194 | sieve_execute_script(1): sieve -1237848064 rc No error | ||
195 | 69 | ||
196 | Test: ex-4.4a.sv | 70 | Test: ex-4.4a.sv |
197 | mbox had 2 messages... | 71 | KEEP on msg uid 1 |
198 | getsize -> 587 | 72 | KEEP on msg uid 2 |
199 | action => KEEP | ||
200 | Action(s) taken: | ||
201 | Kept | ||
202 | |||
203 | getsize -> 539 | ||
204 | action => KEEP | ||
205 | Action(s) taken: | ||
206 | Kept | ||
207 | |||
208 | 73 | ||
209 | Test: ex-4.4b.sv | 74 | Test: ex-4.4b.sv |
210 | mbox had 2 messages... | 75 | KEEP on msg uid 1 |
211 | getsize -> 587 | 76 | KEEP on msg uid 2 |
212 | action => KEEP | ||
213 | Action(s) taken: | ||
214 | Kept | ||
215 | |||
216 | getsize -> 539 | ||
217 | action => KEEP | ||
218 | Action(s) taken: | ||
219 | Kept | ||
220 | |||
221 | 77 | ||
222 | Test: ex-4.5.sv | 78 | Test: ex-4.5.sv |
223 | mbox had 2 messages... | 79 | KEEP on msg uid 1 |
224 | getheader, filling cache with 4 fields | 80 | KEEP on msg uid 2 |
225 | getheader, cacheing X-Caffeine=C8H10N4O2 | ||
226 | getheader, cacheing Subject=I have a present for you | ||
227 | getheader, cacheing To=roadrunner@acme.example.com | ||
228 | getheader, cacheing From=coyote@desert.example.org | ||
229 | getheader, from=coyote@desert.example.org | ||
230 | action => KEEP | ||
231 | Action(s) taken: | ||
232 | Kept | ||
233 | |||
234 | getheader, filling cache with 4 fields | ||
235 | getheader, cacheing Date=TBD | ||
236 | getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
237 | getheader, cacheing To=rube@landru.example.edu | ||
238 | getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid | ||
239 | getheader, from=youcouldberich!@reply-by-postal-mail.invalid | ||
240 | action => KEEP | ||
241 | Action(s) taken: | ||
242 | Kept | ||
243 | |||
244 | 81 | ||
245 | Test: ex-5.1.sv | 82 | Test: ex-5.1.sv |
246 | mbox had 2 messages... | 83 | KEEP on msg uid 1 |
247 | getheader, filling cache with 4 fields | 84 | KEEP on msg uid 2 |
248 | getheader, cacheing X-Caffeine=C8H10N4O2 | ||
249 | getheader, cacheing Subject=I have a present for you | ||
250 | getheader, cacheing To=roadrunner@acme.example.com | ||
251 | getheader, cacheing From=coyote@desert.example.org | ||
252 | getheader, from=coyote@desert.example.org | ||
253 | action => KEEP | ||
254 | Action(s) taken: | ||
255 | Kept | ||
256 | |||
257 | getheader, filling cache with 4 fields | ||
258 | getheader, cacheing Date=TBD | ||
259 | getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
260 | getheader, cacheing To=rube@landru.example.edu | ||
261 | getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid | ||
262 | getheader, from=youcouldberich!@reply-by-postal-mail.invalid | ||
263 | action => KEEP | ||
264 | Action(s) taken: | ||
265 | Kept | ||
266 | |||
267 | 85 | ||
268 | Test: ex-5.7.sv | 86 | Test: ex-5.7.sv |
269 | mbox had 2 messages... | 87 | discard - deleting failed: [0] Success |
270 | getheader, filling cache with 4 fields | 88 | KEEP on msg uid 1 |
271 | getheader, cacheing X-Caffeine=C8H10N4O2 | 89 | DISCARD on msg uid 2: marking as deleted |
272 | getheader, cacheing Subject=I have a present for you | ||
273 | getheader, cacheing To=roadrunner@acme.example.com | ||
274 | getheader, cacheing From=coyote@desert.example.org | ||
275 | getheader, X-Caffeine=C8H10N4O2 | ||
276 | getheader, X-Caffeine=C8H10N4O2 | ||
277 | action => KEEP | ||
278 | Action(s) taken: | ||
279 | Kept | ||
280 | |||
281 | getheader, filling cache with 4 fields | ||
282 | getheader, cacheing Date=TBD | ||
283 | getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$ | ||
284 | getheader, cacheing To=rube@landru.example.edu | ||
285 | getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid | ||
286 | getheader X-Caffeine, failed No such file or directory | ||
287 | getheader X-Caffeine, failed No such file or directory | ||
288 | action => DISCARD | ||
289 | Action(s) taken: | ||
290 | Discarded | ||
291 | |||
292 | 90 | ||
293 | Test: ex-9.sv | 91 | Test: ex-9.sv |
294 | mbox had 2 messages... | 92 | ex-9.sv:5: unsupported feature |
295 | getsize -> 587 | ||
296 | getheader, filling cache with 4 fields | ||
297 | getheader, cacheing X-Caffeine=C8H10N4O2 | ||
298 | getheader, cacheing Subject=I have a present for you | ||
299 | getheader, cacheing To=roadrunner@acme.example.com | ||
300 | getheader, cacheing From=coyote@desert.example.org | ||
301 | getheader Sender, failed No such file or directory | ||
302 | getheader, From=coyote@desert.example.org | ||
303 | getheader, To=roadrunner@acme.example.com | ||
304 | getheader, To=roadrunner@acme.example.com | ||
305 | getheader Cc, failed No such file or directory | ||
306 | getheader Bcc, failed No such file or directory | ||
307 | action => FILEINTO | ||
308 | into <spam> | ||
309 | fail with [2] no handler for this type of mailbox | ||
310 | runtime error: Fileinto: no handler for this type of mailbox | ||
311 | Action(s) taken: | ||
312 | Fileinto action failed: no handler for this type of mailbox | ||
313 | |||
314 | sieve_execute_script(1): sieve -1237848064 rc No such file or directory | ||
315 | 93 | ||
316 | Test: ex-null.sv | 94 | Test: ex-null.sv |
317 | mbox had 2 messages... | 95 | KEEP on msg uid 1 |
318 | action => KEEP | 96 | KEEP on msg uid 2 |
319 | Action(s) taken: | ||
320 | Kept | ||
321 | 97 | ||
322 | action => KEEP | 98 | Test: ex-save-all.sv |
323 | Action(s) taken: | 99 | FILEINTO on msg uid 1: delivering into ./_save-all.mbox |
324 | Kept | 100 | FILEINTO on msg uid 2: delivering into ./_save-all.mbox |
325 | 101 | ||
102 | Test: ex-stop.sv | ||
103 | KEEP on msg uid 1 | ||
104 | KEEP on msg uid 2 | ... | ... |
-
Please register or sign in to post a comment