From b91adb30a2651e41aa2774871ae201be2454ef96 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Fri, 19 Jun 2015 03:31:37 -0400 Subject: [PATCH] Adapt charset cleanup tests to pass with different versions of iconv propucing slightyl different output --- tests/Framework/Charset.php | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/tests/Framework/Charset.php b/tests/Framework/Charset.php index 3e6287c..ece83aa 100644 --- a/tests/Framework/Charset.php +++ b/tests/Framework/Charset.php @@ -16,7 +16,6 @@ return array( array('', ''), array("\xC1", ""), - array("сим\xD0вол", "символ"), array("Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν", "Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν"), ); } @@ -30,6 +29,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