From bd0551b22076b82a6d49e9f7a2b2e0c90a1b2326 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 05 Feb 2016 07:25:27 -0500
Subject: [PATCH] Secure also downloads of addressbook exports, managesieve script exports and Enigma keys exports

---
 tests/Framework/Charset.php |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/tests/Framework/Charset.php b/tests/Framework/Charset.php
index d3d3e88..752ddf4 100644
--- a/tests/Framework/Charset.php
+++ b/tests/Framework/Charset.php
@@ -4,6 +4,8 @@
  * Test class to test rcube_charset class
  *
  * @package Tests
+ * @group iconv
+ * @group mbstring
  */
 class Framework_Charset extends PHPUnit_Framework_TestCase
 {
@@ -15,7 +17,8 @@
     {
         return array(
             array('', ''),
-            array("\xC1", ''),
+            array("\xC1", ""),
+            array("Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν", "Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν"),
         );
     }
 
@@ -28,6 +31,16 @@
     }
 
     /**
+     * Just check for faulty byte-sequence, regardless of the actual cleaning results
+     */
+    function test_clean_2()
+    {
+        $bogus = "сим\xD0вол";
+        $this->assertRegExp('/\xD0\xD0/', $bogus);
+        $this->assertNotRegExp('/\xD0\xD0/', rcube_charset::clean($bogus));
+    }
+
+    /**
      * Data for test_parse_charset()
      */
     function data_parse_charset()

--
Gitblit v1.9.1