summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-01-26 07:19:56 +0000
committerthomascube <thomas@roundcube.net>2010-01-26 07:19:56 +0000
commit5570ad60b496974607790dab49fc80cce8f5c700 (patch)
tree9ef741d7f986892d5a88b4b1580b74500dadde31 /tests/src
parent580ff9c55e81aae04add43c95071c57e346a19ce (diff)
Improved charset detection in vcard import + added unit tests for it
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/apple.vcf49
-rw-r--r--tests/src/johndoe.vcf11
2 files changed, 60 insertions, 0 deletions
diff --git a/tests/src/apple.vcf b/tests/src/apple.vcf
new file mode 100644
index 000000000..856eaf328
--- /dev/null
+++ b/tests/src/apple.vcf
@@ -0,0 +1,49 @@
+BEGIN:VCARD
+VERSION:3.0
+N:;;;;
+FN:Apple Computer AG
+ORG:Apple Computer AG;
+item1.ADR;type=WORK;type=pref:;;Birgistrasse 4a;Wallisellen-Zürich;;8304;Switzerland
+item1.X-ABADR:ch
+item2.URL;type=pref:http\://www.apple.ch
+item2.X-ABLabel:_$!<HomePage>!$_
+PHOTO;BASE64:
+ /9j/4AAQSkZJRgABAQAAAQABAAD/7QAcUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAD/2wBDAAEB
+ AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
+ AQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
+ AQEBAQEBAQEBAQEBAQEBAQH/wAARCAAwADADAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAA
+ AAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEI
+ I0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISU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nb7zy6mlmL2R2/iZ5yT3NX
+ 7Spbl9pPl/l55W+69iPZUubm9nDmvfm5I81+97XuX9a8MeGvEtsLLxF4e0PX7MMGFprWk2Gq2wZe
+ jCC+t54tw7HZkdqUZzg7wlKL7xk4v700OUIT0lCMl2lFS/NMuaXpOlaHZQ6Zoumafo+nW4It9P0u
+ yttPsoATkiG1tI4oIgTyQkagnmk5Sk7ybk+7bb+96jjGMVaMVFdopJfcjQpDP//Z
+X-ABShowAs:COMPANY
+X-ABUID:2E4CB084-4767-4C85-BBCA-805B1DCB1C8E\:ABPerson
+END:VCARD
diff --git a/tests/src/johndoe.vcf b/tests/src/johndoe.vcf
new file mode 100644
index 000000000..67b649df3
--- /dev/null
+++ b/tests/src/johndoe.vcf
@@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:2.1
+N;CHARSET=windows-1252:Doë;John;;;
+FN;CHARSET=windows-1252:John Doë
+ORG:roundcube.net;
+EMAIL;INTERNET;WORK:inbox@roundcube.net
+EMAIL;INTERNET;HOME;TYPE=pref:roundcube@gmail.com
+TEL;WORK:+123456789
+ADR;WORK:;;The street;Hometown;;5555;Cayman Islands
+NOTE:The notes...
+END:VCARD