summaryrefslogtreecommitdiff
path: root/plugins/managesieve/tests/parser_imapflags.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/managesieve/tests/parser_imapflags.phpt')
-rw-r--r--plugins/managesieve/tests/parser_imapflags.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/managesieve/tests/parser_imapflags.phpt b/plugins/managesieve/tests/parser_imapflags.phpt
new file mode 100644
index 000000000..a4bc465a3
--- /dev/null
+++ b/plugins/managesieve/tests/parser_imapflags.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Test of Sieve vacation extension (RFC5232)
+--SKIPIF--
+--FILE--
+<?php
+include '../lib/rcube_sieve_script.php';
+
+$txt = '
+require ["imapflags"];
+# rule:[imapflags]
+if header :matches "Subject" "^Test$" {
+ setflag "\\\\Seen";
+ addflag ["\\\\Answered","\\\\Deleted"];
+}
+';
+
+$s = new rcube_sieve_script($txt, array('imapflags'));
+echo $s->as_text();
+
+?>
+--EXPECT--
+require ["imapflags"];
+# rule:[imapflags]
+if header :matches "Subject" "^Test$"
+{
+ setflag "\\Seen";
+ addflag ["\\Answered","\\Deleted"];
+}