[clouchdb-cvs] CVS clouchdb/src

peddy peddy at common-lisp.net
Mon Dec 17 23:18:08 UTC 2007


Update of /project/clouchdb/cvsroot/clouchdb/src
In directory clnet:/tmp/cvs-serv3658/src

Modified Files:
	tests.lisp 
Log Message:
Fixed utf-8 encoding bug


--- /project/clouchdb/cvsroot/clouchdb/src/tests.lisp	2007/12/14 23:22:58	1.3
+++ /project/clouchdb/cvsroot/clouchdb/src/tests.lisp	2007/12/17 23:18:07	1.4
@@ -336,6 +336,45 @@
   (ensure (document-property :ok (create-document '((:a "test")) :id "http://google.com")))
   (ensure-same (document-property :_id (get-document "http://google.com")) "http://google.com"))
 
+(addtest (clouchdb-doc-api-tests)
+  (:documentation "Test document content encoding by creating a
+  document with a field for a variety of languages, then fetching that
+  document and comparing the fecthed data with the source data") 
+  encode-document-contents-glass-eating
+  (ensure
+   (let ((glass-eaters '((:middle-english . "An preost wes on leoden, Laȝamon was ihoten")
+                         (:classical-greek . "ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει.")
+                         (:monotonic-greek . "Μπορώ να φάω σπασμένα γυαλιά χωρίς να πάθω τίποτα.")
+                         (:polytonic-greek . "Μπορῶ νὰ φάω σπασμένα γυαλιὰ χωρὶς νὰ πάθω τίποτα.")
+                         (:french . "Je peux manger du verre, ça ne me fait pas de mal.")
+                         (:provençal . "Pòdi manjar de veire, me nafrariá pas.")
+                         (:walloon . "Dji pou magnî do vêre, çoula m' freut nén må.")
+                         (:spanish . "Puedo comer vidrio, no me hace daño.")
+                         (:romanian . "Pot să mănânc sticlă și ea nu mă rănește.")
+                         (:esperanto . "Mi povas manĝi vitron, ĝi ne damaĝas min.")
+                         (:czech . "Mohu jíst sklo, neublíží mi.")
+                         (:lithuanian . "Aš galiu valgyti stiklą ir jis manęs nežeidžia")
+                         (:polska . "Mogę jeść szkło i mi nie szkodzi.")
+                         (:macedonian . "Можам да јадам стакло, а не ме штета.")
+                         (:russian . "Я могу есть стекло, оно мне не вредит.")
+                         (:belarusian-cyrillic . "Я магу есці шкло, яно мне не шкодзіць.")
+                         (:belarusian-lacinka . "Ja mahu jeści škło, jano mne ne škodzić.")
+                         (:armenian . "Ô¿Ö€Õ¶Õ¡Õ´ Õ¡ÕºÕ¡Õ¯Õ« Õ¸Ö‚Õ¿Õ¥Õ¬ Ö‡ Õ«Õ¶Õ®Õ« Õ¡Õ¶Õ°Õ¡Õ¶Õ£Õ«Õ½Õ¿ Õ¹Õ¨Õ¶Õ¥Ö€Ö‰")
+                         (:hebrew . "אני יכול לאכול זכוכית וזה לא מזיק לי")
+                         (:yiddish . "איך קען עסן גלאָז און עס טוט מיר נישט װײ")
+                         (:chinese . "我能吞下玻璃而不伤身体。")
+                         (:chinese-traditional . "我能吞下玻璃而不傷身體。")
+                         (:japanese . "私はガラスを食べられます。それは私を傷つけません。")
+                         (:korean . "나는 유리를 먹을 수 있어요. 그래도 아프지 않아요")
+                         (:euro-symbol . "€")
+                         (:georgian . "მინას ვჭამ და არა მტკივა."))))
+     (and (document-property :ok (create-document glass-eaters :id "glass-eaters"))
+          (let ((doc (get-document "glass-eaters")))
+            (reduce #'(lambda (a b) (and a b))
+                    (mapcar #'(lambda (e) 
+                                (equal (cdr e)
+                                       (document-property (car e) doc)))
+                            doc)))))))
 ;;
 ;; View API Tests
 ;;




More information about the clouchdb-cvs mailing list