summaryrefslogtreecommitdiff
path: root/tests/Framework/VCard.php
diff options
context:
space:
mode:
authorAndy Wermke <andy@dev.next-step-software.com>2013-04-04 16:10:23 +0200
committerAndy Wermke <andy@dev.next-step-software.com>2013-04-04 16:10:23 +0200
commit92cd7f34b07e86062f2c024039e3309768b48ce6 (patch)
tree63b9f39280ebcab80742d9f2b4db6a139c1791e1 /tests/Framework/VCard.php
parent029d18f13bcf01aa2f1f08dbdfc6400c081bf7cb (diff)
parent443b92a7ee19e321b350750240e0fc54ec5be357 (diff)
Merge branch 'master' of https://github.com/roundcube/roundcubemail
Diffstat (limited to 'tests/Framework/VCard.php')
-rw-r--r--tests/Framework/VCard.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Framework/VCard.php b/tests/Framework/VCard.php
index 79d297664..15aa5d816 100644
--- a/tests/Framework/VCard.php
+++ b/tests/Framework/VCard.php
@@ -50,6 +50,21 @@ 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\\\\\\;\\\\;prefix;\nFN:test\nEND:VCARD";
+ $vcard = new rcube_vcard($vcard, null);
+ $vcard = $vcard->get_assoc();
+
+ $this->assertEquals("last;", $vcard['surname'], "Decode backslash character");
+ $this->assertEquals("first\\", $vcard['firstname'], "Decode backslash character");
+ $this->assertEquals("middle\\;\\", $vcard['middlename'], "Decode backslash character");
+ $this->assertEquals("prefix", $vcard['prefix'], "Decode backslash character");
+ }
+
function test_import()
{
$input = file_get_contents($this->_srcpath('apple.vcf'));