summaryrefslogtreecommitdiff
path: root/plugins/managesieve/tests/parset_subaddress.phpt
blob: 6d4d03c6ea2562f0822bd9a88798dd9a61abd968 (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
--TEST--
Test of Sieve subaddress extension (RFC5233)
--SKIPIF--
--FILE--
<?php
include '../lib/rcube_sieve_script.php';

$txt = '
require ["envelope","subaddress","fileinto"];
if envelope :user "To" "postmaster"
{
	fileinto "postmaster";
	stop;
}
if envelope :detail :is "To" "mta-filters"
{
	fileinto "mta-filters";
	stop;
}
';

$s = new rcube_sieve_script($txt);
echo $s->as_text();

// -------------------------------------------------------------------------------
?>
--EXPECT--
require ["envelope","subaddress","fileinto"];
if envelope :user "To" "postmaster"
{
	fileinto "postmaster";
	stop;
}
if envelope :detail :is "To" "mta-filters"
{
	fileinto "mta-filters";
	stop;
}