]> git.donarmstrong.com Git - roundcube.git/blob - plugins/managesieve/tests/parser_body.phpt
Imported Upstream version 0.7
[roundcube.git] / plugins / managesieve / tests / parser_body.phpt
1 --TEST--
2 Test of Sieve body extension (RFC5173)
3 --SKIPIF--
4 --FILE--
5 <?php
6 include '../lib/rcube_sieve_script.php';
7
8 $txt = '
9 require ["body","fileinto"];
10 if body :raw :contains "MAKE MONEY FAST"
11 {
12         stop;
13 }
14 if body :content "text" :contains ["missile","coordinates"]
15 {
16         fileinto "secrets";
17 }
18 if body :content "audio/mp3" :contains ""
19 {
20         fileinto "jukebox";
21 }
22 if body :text :contains "project schedule"
23 {
24         fileinto "project/schedule";
25 }
26 ';
27
28 $s = new rcube_sieve_script($txt);
29 echo $s->as_text();
30
31 ?>
32 --EXPECT--
33 require ["body","fileinto"];
34 if body :raw :contains "MAKE MONEY FAST"
35 {
36         stop;
37 }
38 if body :content "text" :contains ["missile","coordinates"]
39 {
40         fileinto "secrets";
41 }
42 if body :content "audio/mp3" :contains ""
43 {
44         fileinto "jukebox";
45 }
46 if body :text :contains "project schedule"
47 {
48         fileinto "project/schedule";
49 }