diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-01-05 18:19:01 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-01-05 18:19:01 +0100 |
commit | 2c777be5dd5741579736b4efcd629eee3eb25e20 (patch) | |
tree | d798aa569daaae717775e470ea71a4da6351ee6d /tests | |
parent | b2064d5fc05829657cb366a56f7045f797c31eea (diff) |
Add test for vCard issue (#1488896)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Framework/VCard.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Framework/VCard.php b/tests/Framework/VCard.php index 79d297664..3bc01b186 100644 --- a/tests/Framework/VCard.php +++ b/tests/Framework/VCard.php @@ -50,6 +50,19 @@ class Framework_VCard extends PHPUnit_Framework_TestCase $this->assertRegExp('/TEL;TYPE=CELL:\+987654321/', $vcf, "Return CELL instead of MOBILE (set)"); } + /** + * Backslash escaping test (#1488896) + */ + function test_parse_four() + { + $vcard = "BEGIN:VCARD\nVERSION:3.0\nN:last\\;;first\\\\;middle;;\nFN:test\nEND:VCARD"; + $vcard = new rcube_vcard($vcard, null); + + $this->assertEquals("last;", $vcard->surname, "Decode backslash character"); + $this->assertEquals("first\\", $vcard->firstname, "Decode backslash character"); + $this->assertEquals("middle", $vcard->middlename, "Decode backslash character"); + } + function test_import() { $input = file_get_contents($this->_srcpath('apple.vcf')); |