From 4a2e3a71a1ce79482ba704ec815013de2c986274 Mon Sep 17 00:00:00 2001 From: Nathan Bird Date: Thu, 4 Feb 2010 09:44:00 -0500 Subject: [PATCH] Move i18n tests to separate file until we have a better system of dealing with them. Also added some comments to properly documenting them as multi-byte tests and describe their properties a bit better. --- tests/test-basic.lisp | 10 ---------- tests/test-i18n.lisp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 tests/test-i18n.lisp diff --git a/tests/test-basic.lisp b/tests/test-basic.lisp index 2c13d80..5bdc0a3 100644 --- a/tests/test-basic.lisp +++ b/tests/test-basic.lisp @@ -227,16 +227,6 @@ "mismatch on a. inserted: ~a returned: ~a" len (length a))) ))) nil) - - (deftest :basic/i18n/1 - (first (query "SELECT 'Iñtërnâtiônàlizætiøn'" - :flatp t :field-names nil)) - "Iñtërnâtiônàlizætiøn") - - (deftest :basic/i18n/2 - (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-i18n.lisp b/tests/test-i18n.lisp new file mode 100644 index 0000000..59f9b7a --- /dev/null +++ b/tests/test-i18n.lisp @@ -0,0 +1,32 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: test-i18n.lisp +;;;; Purpose: Tests for passing non-ascii encoded strings to db and back +;;;; Author: Nathan Bird +;;;; Created: Feb 2010 +;;;; +;;;; This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg +;;;; +;;;; CLSQL users are granted the rights to distribute and use this software +;;;; as governed by the terms of the Lisp Lesser GNU Public License +;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. +;;;; ************************************************************************* + +(in-package #:clsql-tests) + +;;; 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 +(deftest :basic/i18n/1 + (first (query "SELECT 'Iñtërnâtiônàlizætiøn'" + :flatp t :field-names nil)) + "Iñtërnâtiônàlizætiøn") + +;; 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 + (first (query "SELECT 'Iñtërnâtiônàližætiøn'" + :flatp t :field-names nil)) + "Iñtërnâtiônàližætiøn") -- 2.34.1