|
Last change
on this file since 5441 was
5441,
checked in by alec, 19 months ago
|
- Added 'address' and 'envelope' tests support
- Added 'body' extension support (RFC5173)
- Added 'subaddress' extension support (RFC5233)
- Added comparators support
- Changed Sender/Recipient? labels to From/To?
- Fixed importing rule names from Ingo
- Fixed handling of extensions disabled in config
|
|
File size:
515 bytes
|
| Line | |
|---|
| 1 | --TEST-- |
|---|
| 2 | Test of Sieve vacation extension (RFC5232) |
|---|
| 3 | --SKIPIF-- |
|---|
| 4 | --FILE-- |
|---|
| 5 | <?php |
|---|
| 6 | include '../lib/rcube_sieve_script.php'; |
|---|
| 7 | |
|---|
| 8 | $txt = ' |
|---|
| 9 | require ["imapflags"]; |
|---|
| 10 | # rule:[imapflags] |
|---|
| 11 | if header :matches "Subject" "^Test$" { |
|---|
| 12 | setflag "\\\\Seen"; |
|---|
| 13 | addflag ["\\\\Answered","\\\\Deleted"]; |
|---|
| 14 | } |
|---|
| 15 | '; |
|---|
| 16 | |
|---|
| 17 | $s = new rcube_sieve_script($txt, array('imapflags')); |
|---|
| 18 | echo $s->as_text(); |
|---|
| 19 | |
|---|
| 20 | ?> |
|---|
| 21 | --EXPECT-- |
|---|
| 22 | require ["imapflags"]; |
|---|
| 23 | # rule:[imapflags] |
|---|
| 24 | if header :matches "Subject" "^Test$" |
|---|
| 25 | { |
|---|
| 26 | setflag "\\Seen"; |
|---|
| 27 | addflag ["\\Answered","\\Deleted"]; |
|---|
| 28 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.