diff options
author | thomascube <thomas@roundcube.net> | 2011-01-04 22:00:35 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-01-04 22:00:35 +0000 |
commit | 6bdb6102c06c605d18f5d2cfba8ac806875ae13a (patch) | |
tree | 5ceffdfcf542f249d2d12c6354c8751d6daac1ac /tests | |
parent | 636328483fb1e5e5f3abc10ce70e8f60a2a1f9e4 (diff) |
Do charset detection in vcards with encoded values (#1485542)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/thebat.vcf | 8 | ||||
-rw-r--r-- | tests/vcards.php | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/src/thebat.vcf b/tests/src/thebat.vcf new file mode 100644 index 000000000..8179f788d --- /dev/null +++ b/tests/src/thebat.vcf @@ -0,0 +1,8 @@ +BEGIN:VCARD
+VERSION:2.1
+N;ENCODING=QUOTED-PRINTABLE:Iksi=F1ski;Piotr
+FN;ENCODING=QUOTED-PRINTABLE:Piotr Iksi=F1ski
+EMAIL;PREF;INTERNET:piotr.iksinski@somedomain.com
+X-GENDER:Male
+REV:20080716T203548Z
+END:VCARD
diff --git a/tests/vcards.php b/tests/vcards.php index 72c687484..3b8f260c4 100644 --- a/tests/vcards.php +++ b/tests/vcards.php @@ -48,6 +48,10 @@ class rcube_test_vcards extends UnitTestCase $this->assertEqual(2, count($vcards), "Detected 2 vcards"); $this->assertEqual("Apple Computer AG", $vcards[0]->displayname, "FN => displayname"); $this->assertEqual("John Doë", $vcards[1]->displayname, "Displayname with correct charset"); + + // http://trac.roundcube.net/ticket/1485542 + $vcards2 = rcube_vcard::import(file_get_contents($this->_srcpath('thebat.vcf'))); + $this->assertEqual("Iksiñski", $vcards2[0]->surname, "Detect charset in encoded values"); } } |