Commit d00dbd16 d00dbd163287bbc53bef4f764dc91b2a9f3bfe44 by Sergey Poznyakoff

sieve: test "list" extension test.

* sieve/tests/list.at: New file.
* sieve/tests/Makefile.am (TESTSUITE_AT): Add list.at.
* sieve/tests/testsuite.at: Include list.at.
1 parent 2d75640f
...@@ -53,6 +53,7 @@ TESTSUITE_AT = \ ...@@ -53,6 +53,7 @@ TESTSUITE_AT = \
53 i-casemap.at\ 53 i-casemap.at\
54 i-numeric.at\ 54 i-numeric.at\
55 i-octet.at\ 55 i-octet.at\
56 list.at\
56 moderator.at\ 57 moderator.at\
57 mul-addr.at\ 58 mul-addr.at\
58 not.at\ 59 not.at\
......
1 # This file is part of GNU Mailutils. -*- Autotest -*-
2 # Copyright (C) 2010 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # GNU Mailutils is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16
17 m4_pushdef([MUT_SIEVE_EXT_NAME],[list])
18
19 MUT_SIEVE_EXT_TEST([],[list test-list],
20 [require "test-list";
21 if list :matches :delim " ," [[ "X-Spam-Keywords", "X-Spamd-Keywords" ]]
22 [[ "HTML_*", "FORGED_*" ]]
23 {
24 discard;
25 }
26 ],
27 [AT_DATA([mailbox],[From foobar@example.net Thu Dec 23 00:38:09 2010
28 Date: Thu, 23 Dec 2010 00:38:09 +0200
29 From: Foo Bar <foobar@example.net>
30 To: <gray@gnu.org>
31 Subject: Test 1
32 X-Spam-Keywords: x, y, z
33 X-Spamd-Keywords: i, j, k
34
35 text 1
36
37 From foobar@example.net Thu Dec 23 00:40:00 2010
38 Date: Thu, 23 Dec 2010 00:40:00 +0200
39 From: Foo Bar <foobar@example.net>
40 To: <gray@gnu.org>
41 Subject: Test 2
42 X-Spam-Keywords: x, y, z
43 X-Spamd-Keywords: HTML_50
44
45 text 2
46
47 From foobar@example.net Thu Dec 23 00:42:00 2010
48 Date: Thu, 23 Dec 2010 00:42:00 +0200
49 From: Foo Bar <foobar@example.net>
50 To: <gray@gnu.org>
51 Subject: Test 3
52 X-Spam-Keywords: x, y, z
53 X-Spamd-Keywords: QUUX, FORGED_SENDER
54
55 test 3
56
57 From foobar@example.net Thu Dec 23 00:44:00 2010
58 Date: Thu, 23 Dec 2010 00:44:00 +0200
59 From: Foo Bar <foobar@example.net>
60 To: <gray@gnu.org>
61 Subject: Test 4
62
63 test 3
64
65 ])
66 sieve MUT_SIEVE_CMDLINE MUT_SIEVE_OPTIONS -f ./mailbox prog
67 ],
68 [],
69 [IMPLICIT KEEP on msg uid 1
70 DISCARD on msg uid 2: marking as deleted
71 DISCARD on msg uid 3: marking as deleted
72 IMPLICIT KEEP on msg uid 4
73 ])
74
75 m4_popdef([MUT_SIEVE_EXT_NAME])
...@@ -131,6 +131,7 @@ m4_include([ext.at]) ...@@ -131,6 +131,7 @@ m4_include([ext.at])
131 m4_include([moderator.at]) 131 m4_include([moderator.at])
132 m4_include([pipeact.at]) 132 m4_include([pipeact.at])
133 m4_include([pipetest.at]) 133 m4_include([pipetest.at])
134 m4_include([list.at])
134 135
135 136
136 137
......