summaryrefslogtreecommitdiffabout
path: root/sieve
authorSergey Poznyakoff <gray@gnu.org.ua>2003-01-05 16:57:41 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2003-01-05 16:57:41 (GMT)
commit4b01bc7f0ef106e2bc782a62db12c249e16c4785 (patch) (side-by-side diff)
tree5cd155641648a7cab5d9c0248f00d69706cb37de /sieve
parent83abd0daf114b5e365bf819e1de046d1dfaad198 (diff)
downloadmailutils-4b01bc7f0ef106e2bc782a62db12c249e16c4785.tar.gz
mailutils-4b01bc7f0ef106e2bc782a62db12c249e16c4785.tar.bz2
Added new test scripts
Diffstat (limited to 'sieve') (more/less context) (ignore whitespace changes)
-rw-r--r--sieve/testsuite/scripts/DISTFILES3
-rw-r--r--sieve/testsuite/scripts/rel-address.sv13
-rw-r--r--sieve/testsuite/scripts/rel-hairy.sv35
-rw-r--r--sieve/testsuite/scripts/rel-header.sv13
4 files changed, 64 insertions, 0 deletions
diff --git a/sieve/testsuite/scripts/DISTFILES b/sieve/testsuite/scripts/DISTFILES
index 0a18051..11d88a5 100644
--- a/sieve/testsuite/scripts/DISTFILES
+++ b/sieve/testsuite/scripts/DISTFILES
@@ -36,6 +36,9 @@ null.sv
numaddr.sv
redirect.sv
reject.sv
+rel-address.sv
+rel-hairy.sv
+rel-header.sv
size1.sv
size2.sv
stop.sv
diff --git a/sieve/testsuite/scripts/rel-address.sv b/sieve/testsuite/scripts/rel-address.sv
new file mode 100644
index 0000000..b8fad11
--- a/dev/null
+++ b/sieve/testsuite/scripts/rel-address.sv
@@ -0,0 +1,13 @@
+# -*- sieve -*-
+# This file is part of Mailutils testsuite.
+# Copyright (C) 2003, Free Software Foundation.
+# See file COPYING for distribution conditions.
+
+require ["relational", "comparator-i;ascii-numeric"];
+
+if address :count "ge" :comparator "i;ascii-numeric" ["to", "cc"] ["3"]
+ {
+ discard;
+ }
+
+# 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 0000000..fbb95e6
--- a/dev/null
+++ b/sieve/testsuite/scripts/rel-hairy.sv
@@ -0,0 +1,35 @@
+# -*- sieve -*-
+# This file is part of Mailutils testsuite.
+# Copyright (C) 2003, Free Software Foundation.
+# See file COPYING for distribution conditions.
+
+require ["relational", "comparator-i;ascii-numeric", "fileinto"];
+
+if header :value "lt" :comparator "i;ascii-numeric" ["x-priority"] ["3"]
+ {
+ fileinto "Priority";
+ }
+elsif address :count "gt" :comparator "i;ascii-numeric" ["to"] ["5"]
+ {
+ # everything with more than 5 recipients in the "to" field
+ # is considered SPAM
+ fileinto "SPAM";
+ }
+elsif address :value "gt" :all :comparator "i;ascii-casemap" ["from"] ["M"]
+ {
+ fileinto "From_N-Z";
+ }
+else
+ {
+ fileinto "From_A-M";
+ }
+
+if allof (address :count "eq" :comparator "i;ascii-numeric"
+ ["to", "cc"] ["1"] ,
+ address :all :comparator "i;ascii-casemap"
+ ["to", "cc"] ["me@foo.example.com.invalid"])
+ {
+ fileinto "Only_me";
+ }
+
+# 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 0000000..1421efb
--- a/dev/null
+++ b/sieve/testsuite/scripts/rel-header.sv
@@ -0,0 +1,13 @@
+# -*- sieve -*-
+# This file is part of Mailutils testsuite.
+# Copyright (C) 2003, Free Software Foundation.
+# See file COPYING for distribution conditions.
+
+require ["relational", "comparator-i;ascii-numeric"];
+
+if header :count "gt" ["received"] ["2"]
+ {
+ discard;
+ }
+
+# End of rel-address.sv

Return to:

Send suggestions and report system problems to the System administrator.