From: Kevin Rosenberg Date: Fri, 5 Feb 2010 22:27:37 +0000 (-0700) Subject: Load and use test-i18n.lisp when uffi:no-i18n is not present in cl:*features* X-Git-Tag: v5.0.0~12 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=f26d09724b4aa3d6bc8eae35582c8b15b9b3f5da Load and use test-i18n.lisp when uffi:no-i18n is not present in cl:*features* --- diff --git a/ChangeLog b/ChangeLog index 8abf423..572da10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-02-05 Kevin Rosenberg + * clsql-test.asd, tests/{test-i18n,test-init}.lisp: + Load test-i18n.lisp and use its tests as long as 'uffi:no-i18n is + not present in cl:*features*. This requires UFFI 1.7.2 or above. + 2010-02-05 Kevin Rosenberg * sql/utils.lisp: Reading #\no-break_space causes an error for non-unicode SBCL. Conditionalize read of diff --git a/clsql-tests.asd b/clsql-tests.asd index 60ffd0e..ddd2bbe 100644 --- a/clsql-tests.asd +++ b/clsql-tests.asd @@ -43,7 +43,9 @@ (:file "test-fdml") (:file "test-ooddl") (:file "test-oodml") - (:file "test-syntax"))))) + (:file "test-syntax") + #-uffi:no-i18n (:file "test-i18n") + )))) (defmethod perform ((o test-op) (c (eql (find-system 'clsql-tests)))) (operate 'load-op 'clsql) diff --git a/sql/utils.lisp b/sql/utils.lisp index 0ead522..515dc49 100644 --- a/sql/utils.lisp +++ b/sql/utils.lisp @@ -24,7 +24,7 @@ ;; AllegroCL 8-bit strings don't fail on reading #\no-break_space, ;; but can't represent such a character ;; CMUCL errors when trying to read #\no-break_space - #+lispworks #\no-break-space + #+(and lispworks unicode) #\no-break-space #+(or (and sbcl sb-unicode) (and allegro ics) (and clisp i18n) (and openmcl openmcl-unicode-strings)) #\no-break_space diff --git a/tests/test-i18n.lisp b/tests/test-i18n.lisp index 59f9b7a..6374a3f 100644 --- a/tests/test-i18n.lisp +++ b/tests/test-i18n.lisp @@ -16,6 +16,9 @@ (in-package #:clsql-tests) +(setq *rt-i18n* + '( + ;;; The point of these two is to require proper encoding support ;;; UTF-8 for example can handle these easily. ;; I show this as a 20char string and 27 bytes in utf-8 @@ -30,3 +33,5 @@ (first (query "SELECT 'Iñtërnâtiônàližætiøn'" :flatp t :field-names nil)) "Iñtërnâtiônàližætiøn") + +)) diff --git a/tests/test-init.lisp b/tests/test-init.lisp index c428467..2481e83 100644 --- a/tests/test-init.lisp +++ b/tests/test-init.lisp @@ -26,6 +26,8 @@ (defvar *rt-oodml*) (defvar *rt-syntax*) (defvar *rt-time*) +;; Below must be set as nil since test-i18n.lisp is not loaded on all platforms. +(defvar *rt-i18n* nil) (defvar *test-database-type* nil) (defvar *test-database-underlying-type* nil) @@ -66,7 +68,7 @@ (defun default-suites () "The default list of tests to run." (append *rt-internal* *rt-connection* *rt-basic* *rt-fddl* *rt-fdml* - *rt-ooddl* *rt-oodml* *rt-syntax* *rt-time*)) + *rt-ooddl* *rt-oodml* *rt-syntax* *rt-time* *rt-i18n*)) (defvar *error-count* 0)