diff options
author | thomascube <thomas@roundcube.net> | 2011-02-27 13:30:34 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-02-27 13:30:34 +0000 |
commit | 0fbadebe13b13d6da470731df1f055df595c6a89 (patch) | |
tree | 203572c30219b15ca41679cf1087fe161b032cfb /tests | |
parent | ec6c39776959f2ed6c8f21cd7539e3f4a5f84d93 (diff) |
Improve vcard import: map more fields, support photo urls, better UTF-16 charset detection
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/src/utf-16_sample.vcf | bin | 0 -> 460 bytes | |||
-rw-r--r-- | tests/vcards.php | 8 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/src/utf-16_sample.vcf b/tests/src/utf-16_sample.vcf Binary files differnew file mode 100755 index 000000000..22f54618a --- /dev/null +++ b/tests/src/utf-16_sample.vcf diff --git a/tests/vcards.php b/tests/vcards.php index 3b8f260c4..ba5ce2bef 100644 --- a/tests/vcards.php +++ b/tests/vcards.php @@ -54,4 +54,12 @@ class rcube_test_vcards extends UnitTestCase $this->assertEqual("Iksiñski", $vcards2[0]->surname, "Detect charset in encoded values"); } + function test_encodings() + { + $input = file_get_contents($this->_srcpath('utf-16_sample.vcf')); + + $vcards = rcube_vcard::import($input); + $this->assertEqual("Ǽgean ĽdaMonté", $vcards[0]->displayname, "Decoded from UTF-16"); + } + } |