From 0c144b98a417d50b9c073ae3931fdad47390f1f7 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sun, 23 Sep 2012 16:44:13 -0400
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail
---
plugins/managesieve/tests/Parser.php | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/plugins/managesieve/tests/Parser.php b/plugins/managesieve/tests/Parser.php
index 00915cc..2f24870 100644
--- a/plugins/managesieve/tests/Parser.php
+++ b/plugins/managesieve/tests/Parser.php
@@ -15,7 +15,15 @@
*/
function test_parser($input, $output, $message)
{
- $script = new rcube_sieve_script($input);
+ // get capabilities list from the script
+ $caps = array();
+ if (preg_match('/require \[([a-z0-9", ]+)\]/', $input, $m)) {
+ foreach (explode(',', $m[1]) as $cap) {
+ $caps[] = trim($cap, '" ');
+ }
+ }
+
+ $script = new rcube_sieve_script($input, $caps);
$result = $script->as_text();
$this->assertEquals(trim($result), trim($output), $message);
--
Gitblit v1.9.1