X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-i18n.lisp;h=b00c6d5529b028763cf458c719be2a509ff17ec1;hb=f67c4e2a4e5b8371a1b7c1629828999ff909f538;hp=4a6cf67d42bc3a068a961a33994e2455535d031d;hpb=3b0f3c991b373e3f1734bc624ba6e04ccafea357;p=clsql.git diff --git a/tests/test-i18n.lisp b/tests/test-i18n.lisp index 4a6cf67..b00c6d5 100644 --- a/tests/test-i18n.lisp +++ b/tests/test-i18n.lisp @@ -23,7 +23,7 @@ ;;; UTF-8 for example can handle these easily. ;; I show this as a 20char string and 27 bytes in utf-8 (deftest :basic/i18n/1 - (let ((uffi:*default-external-format* :utf-8)) + (let ((uffi:*default-foreign-encoding* :utf-8)) (first (query "SELECT 'Iñtërnâtiônàlizætiøn'" :flatp t :field-names nil))) "Iñtërnâtiônàlizætiøn") @@ -31,9 +31,22 @@ ;; the z in this one is even stronger ;; I show this as a 20char string and 28 bytes in utf-8 (deftest :basic/i18n/2 - (let ((uffi:*default-external-format* :utf-8)) + (let ((uffi:*default-foreign-encoding* :utf-8)) (first (query "SELECT 'Iñtërnâtiônàližætiøn'" :flatp t :field-names nil))) "Iñtërnâtiônàližætiøn") +(deftest :basic/i18n/big/1 + (let ((test-string (with-output-to-string (str) + (dotimes (n 250) + (write-sequence "Iñtërnâtiônàližætiøn" str))))) + (with-dataset *ds-bigtext* + (clsql-sys:execute-command + (format nil + "INSERT INTO testbigtext (a) VALUES ('~a')" + test-string)) + (let ((res (first (clsql:query "SELECT a from testbigtext" :flatp t :field-names nil)))) + (assert (equal test-string res) (test-string res) + "Returned internationalization string was incorrect. Test :basic/i18n/big/1"))))) + ))