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