diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-01-05 16:57:41 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-01-05 16:57:41 +0000 |
commit | 4b01bc7f0ef106e2bc782a62db12c249e16c4785 (patch) | |
tree | 5cd155641648a7cab5d9c0248f00d69706cb37de /sieve | |
parent | 83abd0daf114b5e365bf819e1de046d1dfaad198 (diff) | |
download | mailutils-4b01bc7f0ef106e2bc782a62db12c249e16c4785.tar.gz mailutils-4b01bc7f0ef106e2bc782a62db12c249e16c4785.tar.bz2 |
Added new test scripts
Diffstat (limited to 'sieve')
-rw-r--r-- | sieve/testsuite/scripts/DISTFILES | 3 | ||||
-rw-r--r-- | sieve/testsuite/scripts/rel-address.sv | 13 | ||||
-rw-r--r-- | sieve/testsuite/scripts/rel-hairy.sv | 35 | ||||
-rw-r--r-- | sieve/testsuite/scripts/rel-header.sv | 13 |
4 files changed, 64 insertions, 0 deletions
diff --git a/sieve/testsuite/scripts/DISTFILES b/sieve/testsuite/scripts/DISTFILES index 0a18051fc..11d88a563 100644 --- a/sieve/testsuite/scripts/DISTFILES +++ b/sieve/testsuite/scripts/DISTFILES | |||
@@ -36,6 +36,9 @@ null.sv | |||
36 | numaddr.sv | 36 | numaddr.sv |
37 | redirect.sv | 37 | redirect.sv |
38 | reject.sv | 38 | reject.sv |
39 | rel-address.sv | ||
40 | rel-hairy.sv | ||
41 | rel-header.sv | ||
39 | size1.sv | 42 | size1.sv |
40 | size2.sv | 43 | size2.sv |
41 | stop.sv | 44 | stop.sv |
diff --git a/sieve/testsuite/scripts/rel-address.sv b/sieve/testsuite/scripts/rel-address.sv new file mode 100644 index 000000000..b8fad116f --- /dev/null +++ b/sieve/testsuite/scripts/rel-address.sv | |||
@@ -0,0 +1,13 @@ | |||
1 | # -*- sieve -*- | ||
2 | # This file is part of Mailutils testsuite. | ||
3 | # Copyright (C) 2003, Free Software Foundation. | ||
4 | # See file COPYING for distribution conditions. | ||
5 | |||
6 | require ["relational", "comparator-i;ascii-numeric"]; | ||
7 | |||
8 | if address :count "ge" :comparator "i;ascii-numeric" ["to", "cc"] ["3"] | ||
9 | { | ||
10 | discard; | ||
11 | } | ||
12 | |||
13 | # End of rel-address.sv | ||
diff --git a/sieve/testsuite/scripts/rel-hairy.sv b/sieve/testsuite/scripts/rel-hairy.sv new file mode 100644 index 000000000..fbb95e6e5 --- /dev/null +++ b/sieve/testsuite/scripts/rel-hairy.sv | |||
@@ -0,0 +1,35 @@ | |||
1 | # -*- sieve -*- | ||
2 | # This file is part of Mailutils testsuite. | ||
3 | # Copyright (C) 2003, Free Software Foundation. | ||
4 | # See file COPYING for distribution conditions. | ||
5 | |||
6 | require ["relational", "comparator-i;ascii-numeric", "fileinto"]; | ||
7 | |||
8 | if header :value "lt" :comparator "i;ascii-numeric" ["x-priority"] ["3"] | ||
9 | { | ||
10 | fileinto "Priority"; | ||
11 | } | ||
12 | elsif address :count "gt" :comparator "i;ascii-numeric" ["to"] ["5"] | ||
13 | { | ||
14 | # everything with more than 5 recipients in the "to" field | ||
15 | # is considered SPAM | ||
16 | fileinto "SPAM"; | ||
17 | } | ||
18 | elsif address :value "gt" :all :comparator "i;ascii-casemap" ["from"] ["M"] | ||
19 | { | ||
20 | fileinto "From_N-Z"; | ||
21 | } | ||
22 | else | ||
23 | { | ||
24 | fileinto "From_A-M"; | ||
25 | } | ||
26 | |||
27 | if allof (address :count "eq" :comparator "i;ascii-numeric" | ||
28 | ["to", "cc"] ["1"] , | ||
29 | address :all :comparator "i;ascii-casemap" | ||
30 | ["to", "cc"] ["me@foo.example.com.invalid"]) | ||
31 | { | ||
32 | fileinto "Only_me"; | ||
33 | } | ||
34 | |||
35 | # End of rel-hairy.sv | ||
diff --git a/sieve/testsuite/scripts/rel-header.sv b/sieve/testsuite/scripts/rel-header.sv new file mode 100644 index 000000000..1421efb2c --- /dev/null +++ b/sieve/testsuite/scripts/rel-header.sv | |||
@@ -0,0 +1,13 @@ | |||
1 | # -*- sieve -*- | ||
2 | # This file is part of Mailutils testsuite. | ||
3 | # Copyright (C) 2003, Free Software Foundation. | ||
4 | # See file COPYING for distribution conditions. | ||
5 | |||
6 | require ["relational", "comparator-i;ascii-numeric"]; | ||
7 | |||
8 | if header :count "gt" ["received"] ["2"] | ||
9 | { | ||
10 | discard; | ||
11 | } | ||
12 | |||
13 | # End of rel-address.sv | ||